Also we are running IBDAC 4.5.9 which has the same problem described below.
FB 2.5.2, Delphi XE2 - but the problem is not dependent on these factors.
In our code, we have a syntax like this:
Code: Select all
Qry: update MyTable set MyBlob = :MyBlob where MyID = :MyID
var
b: TBytes;
b := ...; // A blob of length 70552;
...
Qry.ParamByName('MyBlob').AsBytes := b;
Qry.ExecSQL;
Interestingly, the difference between what should be stored (70552) and what is stored (5016) is 65536.
Digging deeper into the DbxIda and IBDac code we found this:
TIBCParamsDesc.SetAsVariant() has handling that looks like nothing greater in length than 65535 ("WORD") is expected.
Code: Select all
BufferOffset := SizeOf(Word)
...
Marshal.WriteInt16(FValue, Len)
Is this by design or is it an outright oversight that a WORD is used to store the length?