Problem using params in TIBCScript
Posted: Mon 18 Apr 2011 22:56
Hello!
I have some problems using Params(BLOB-type) in TIBCScript component.
IBDAC Version - 3.50.0.21, Delphi XE.
My script contains parameters like :hXXX_YYY, where XXX - is offset in some TStream and YYY - it's size (IBExpert-like metadata output).
At first:
Then I search for parameters in the script text using regilar expression, storing offset and size in variables and for each:
where ParamStream is some TMemoryStream.
And, at the end -
Everything seems to be ok, the code is working.
After its finished, i've looked into a database and found that all BLOBs, filled by this script IS NULL.
Is it a bug, or am doing something wrong?
I have some problems using Params(BLOB-type) in TIBCScript component.
IBDAC Version - 3.50.0.21, Delphi XE.
My script contains parameters like :hXXX_YYY, where XXX - is offset in some TStream and YYY - it's size (IBExpert-like metadata output).
At first:
Code: Select all
IBCScript.SQL := ScriptText;Code: Select all
IBCScript.Params.CreateParam(ftBlob, paramname, ptInput);
BlobStream.Seek(paramoffset, soFromBeginning);
ParamStream.Clear;
ParamStream.CopyFrom(BlobStream, paramsize);
ParamStream.Seek(0, soFromBeginning);
IBCScript.Params.ParamByName(paramname).LoadFromStream(ParamStream, ftBlob);
And, at the end -
Code: Select all
IBCScript.Execute;After its finished, i've looked into a database and found that all BLOBs, filled by this script IS NULL.
Is it a bug, or am doing something wrong?