Board index » delphi » Image blobs on Sybase SQL Anywhere getting truncated to 32k bytes

Image blobs on Sybase SQL Anywhere getting truncated to 32k bytes

Has anyone else had a problem with blobs larger than 32k on Sybase SQL
Anywhere?
At first I thought it might be in BDE so I got the latest version of
ODBCExpress to eliminate the BDE but still cannot use blobs greater than
32k.  I have tried changing all the different blob properties in the
ODBC components like BlobSize but to no avail.

 

Re:Image blobs on Sybase SQL Anywhere getting truncated to 32k bytes


Quote
>At first I thought it might be in BDE so I got the latest version of
>ODBCExpress to eliminate the BDE but still cannot use blobs greater than
>32k.  I have tried changing all the different blob properties in the
>ODBC components like BlobSize but to no avail.

I've never had any problems using odbcexpress.

Here's  a procedure I used to go from a memory stream to text. change
the call from BindText to BindBinary and it should work.

[note: that's my internal createtemphstmt call just drag an htmst on a
form. it's *very* fast and lean]

Procedure
UpdateBlobTextFromStream(Hdbc:THdbc;TableName,FieldName:String;Const
AWhereString:String;Stream:TmemoryStream);
var
H:THStmt;
begin
H:=CreateTempHstmt(hdbc);
Stream.Position:=0;
try
 with H do begin
   BlobSize:=Stream.Size;
   SQL:= 'Update '+Tablename+' Set '+FieldName+' =?  '+AWhereString;
   Prepare;
   BindText(1,Stream);
   Execute;
 end;
 finally
  H.Free;
end;
end;

Hope this helps.

Steve Garland sgarl...@astatech.com
ASTA: 3-Tier & Thin Client Tools for Delphi
ASTA Technology Group http://www.astatech.com
Delphi Client/Server NOT required. Non BDE backends welcome!

Re:Image blobs on Sybase SQL Anywhere getting truncated to 32k bytes


Another alternative would be to use Titan SQL Anywhere from www.reggatta.com
Very fast and has no problems with BLOBs of any size.

Re:Image blobs on Sybase SQL Anywhere getting truncated to 32k bytes


This is a problem with SQL Anywhere. It is NOT fixed in their latest release
(5.504), but is available as what they call and Emergency Bug Fix release
(EBF 5.504). I got it by calling Sybase tech support and they emailed it to
me. I have seen it posted that you can obtain it via their web site, but
didn't see it there myself. The problem is unique to applications that use
BDE. We have apps written using straight ODBC calls and blobs > 32K work
fine. But, since fiddling with C Builder, we encountered the problem and got
the EBF to fix it.

Quote
Robert Lieb wrote in message <359150DD.2786C...@compuserve.com>...
>Has anyone else had a problem with blobs larger than 32k on Sybase SQL
>Anywhere?
>At first I thought it might be in BDE so I got the latest version of
>ODBCExpress to eliminate the BDE but still cannot use blobs greater than
>32k.  I have tried changing all the different blob properties in the
>ODBC components like BlobSize but to no avail.

Other Threads