BDE 4.51 and ODBC Blob Fields

Hi,

we are having trouble with Delphi and an SQL Anywhere Database. We are not
able to store or retrieve BLOBs larger than 32k. The table we are using has
a primary index and the BLOB SIZE Parameter is set to 500. Other ODBC
applications (like MS-Access) can store and retrieve BLOBs > 32k from the
DB.

I inserted a 77k BLOB with access. When I try to open the table in Delphi,
my app does not start up and the system is busy until I reset the
application.

After I disabled the BLOB chache of the table it starts up. When I use
direct BDE calls to access the BLOB Field I get a BDE error message 0x000F
from the dbiOPenBlob() call which is not documented.

procedure TForm1.cmdSizeClick(Sender: TObject);
var
 hDataset : HDBICur;
 buffer : Pchar;
  fieldno : integer;
  res : longint;
  dbiRes : word;
  dbiResCat, dbiResCode : word;
begin
  buffer := tblCustomer.ActiveBuffer;
  fieldno := tblCustomerBLOBFIELD.FieldNo;
  hDataset := tblCustomer.Handle;

  dbiRes := dbiOpenBlob(hDataset, buffer, fieldNo, dbiReadOnly);
  dbiResCat := ErrCat(dbiRes);
  dbiResCode := ErrCode(dbiRes);
 // Code 0x000f is returned here

  Check(dbiRes);
  dbiRes := dbiGetBlobSize(hDataset, buffer, fieldNo, res);
  dbiResCat := ErrCat(dbiRes);
  dbiResCode := ErrCode(dbiRes);

  dbiRes := dbiFreeBlob(hDataset, buffer, fieldNo);
  dbiResCat := ErrCat(dbiRes);
  dbiResCode := ErrCode(dbiRes);

 lblBlobsize.Caption := IntToStr(res);
end;

Has anybody else experienced this problem. Any solutions?

Thanks
Stefan Craatz
Comitatus Software Berlin