向数据库中存储word 文档和jpg,bmp图象,用long binary型字段.可是为什么文档大小一但超过32k,从数据库中读出来时,word文档就成乱码,而图象文档报"JPEG error #52"的错误?(32k以下正常)
有什么解决办法?

解决方案 »

  1.   

    可以用流
    下面只是个小例子var
    cString: String;
    oMemory: TMemoryStream;
    Buffer: PChar;
    begin
    cString := 'This is a String Darnit!';
    { Create a new Memory Stream }
    oMemory := TMemoryStream.Create;
    {!! Copy String to a PChar }
    StrPCopy( Buffer, cString );
    { Write the =buffer= and it's size to the stream }
    oMemory.Write( Buffer[0], StrLen( Buffer ) );
    {Write that sucker to the field}
    GraphicFieldName.LoadFromStream( oMemory );
    oMemory.Free;
      

  2.   

    控制面板->BDE里头那个BLOB SIZE改大些
      

  3.   

    to  Nizvoo(瓦匠泥 钟松风 100%投入中) 早改过了,不行
      

  4.   

    我看看我的邮件地址是
    [email protected]
    你留个地址吧
      

  5.   

    to Nizvoo(会点Pascal)程序代码已经给您发过去了
      

  6.   

    帮你看一下。。
    [email protected]
      

  7.   

    to hansion3406(阿木) 
    给您发过去了to Nizvoo(会点Pascal) 
    没有收到请重发。