关于sybase数据库IMAGE字段流操作问题(100分)

  • 主题发起人 主题发起人 shbx_sjuser
  • 开始时间 开始时间
S

shbx_sjuser

Unregistered / Unconfirmed
GUEST, unregistred user!
ADO连接字符串通过sybase odbc,在对表的一个image字段读取并存储成文件时,只能读出4096字节,(已经set textsize,而且长型字段读取缓冲也设置成10M了,这样从文件到表可以保存进去,而且用select length(IMAGE) from table查出保存进去的字节是对的,但是读出来时候只有4096B)<br>while not adoqserch.Eof do<br>&nbsp; begin<br>&nbsp; &nbsp; pressbar1.Position:=n+1; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//进度条开始滚动<br>&nbsp; &nbsp; fs:= Tmemorystream.Create;<br>&nbsp; &nbsp; adoqserchupdatemain2.SaveToStream(fs);<br>&nbsp; &nbsp; fs.SaveToFile(syspath+adoqserchupdatemain5.AsString); //updatemain5字段是存进去时候的文件名<br>&nbsp; &nbsp; adoqserch.next;<br>&nbsp; &nbsp; memo1.Lines.Add('正在下载'+syspath+adoqserchupdatemain5.AsString+' &nbsp;文件大小'+inttostr(fs.Size));<br>&nbsp; &nbsp; memo1.Update;<br>&nbsp; &nbsp; fs.Free;<br>&nbsp; &nbsp; n:=n+1;
 
后退
顶部