Board index » delphi » Sybase Adaptive Server Anywhere ODBC driver BLOBsize setting problem
Simon Wan
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Sybase Adaptive Server Anywhere ODBC driver BLOBsize setting problem
Hi
I'm currently using Delphi 5.0 against Sybase Adaptive Server 11.9.2, the BDE alias is direct SQL link,I store some JPG images in a image field, the jpg file size is between 20k and 400k,and everything is OK. but if I change the database to a ASA( Adaptive Server Anywhere 6) and ODBC driver, I found I can not store a image large than 32k, even I set the BLOB SIZE of the BDE Alias to 1000. the apperence is : I can save a image file to database and commit the transaction, there are no any exception ,the code is like this: ... DBS.QM.Edit .... DBS.QMIIMAGE.LoadFromFile(OpenPDialog1.FileName); DBS.QM.Post; DBS.QM.Active :=False; MyCommitTransaction(nil); (QM is a TQuery) but next time when I try to fetch the Image, I get a JPEG error #52. the code is : if (QIIIMAGE.BlobSize >0) then begin try DMS :=TMemoryStream.Create; JPI :=TJpegImage.Create; QIIIMAGE.SaveToStream(DMS); DMS.Position :=0; JPI.LoadFromStream(DMS); ... QIIIMAGE is the Blob field, for example, if I saved a image size is why? How can I set the ODBC driver' BLOB size limmit? Any help would be appreciated. Regards, Simon |