Hi,
I have found a strange behavior when writing blobs.
I have a TIBCQuery with TDataSetProvider and TClientDataSet and write the blob with CreateBlobStream method of TClientDataSet.
Everything works fine, until i try to write the same(identical binary stream) blob data to the blob field. Then the blob is updated with a NULL value.
Like this:
1) Insert record with blob value = $01$02$03 O.K.
2) Select record and update the blob value to $01$02$03$04 O.K.
3) Select record and update blob value to $01$02$03$04 Error -> a NULL value is written to the blob field and the blob field becomes empty!
Thanks!
Blob problem
We have reproduced the problem. It is caused by some bug in MIDAS. IBDAC receives from MIDAS incorrect value for the BLOB field on the ApplyUpdates call.
As a workaround you can to not set the ModifySQL property of the TIBCUpdateSQL component. In this case UPDATE statement will be generated automatically, and it will not contain fields if their values are unchanged.
As a workaround you can to not set the ModifySQL property of the TIBCUpdateSQL component. In this case UPDATE statement will be generated automatically, and it will not contain fields if their values are unchanged.
Thank you very much!
You point me to the right direction.
I found this midas bug described already in 2003 !!!
To use the UpdateSQL you can do following:
type
TBlobSolvedCDS = class(TClientDataSet)
and after open the ClientDataSet you have to call:
TBlobSolvedCDS(DataSet as TClientDataSet).DSBase.SetProp(dspropINCLBLOBSINDELTA, MaxInt);
This includes the blob in updates and fixes the bug.
Thanks again for your help!
You point me to the right direction.
I found this midas bug described already in 2003 !!!
To use the UpdateSQL you can do following:
type
TBlobSolvedCDS = class(TClientDataSet)
and after open the ClientDataSet you have to call:
TBlobSolvedCDS(DataSet as TClientDataSet).DSBase.SetProp(dspropINCLBLOBSINDELTA, MaxInt);
This includes the blob in updates and fixes the bug.
Thanks again for your help!