Subject Conversion for blobs
Author jack_engleman
I have begun to change a DELPHI 3 program to IBO. I have begun the
conversion. and I have run into a problem concerning the use of Blobs.
I use a blob, in this case, to hold an array of 180 small integers.
the current code looks up a record and then reads the blob into the
array. I then manipulate the array in the program and then can write
the blob out using the stream capabilities as shown in the code below.

What is the TBlobStream equilavalent? TIB_ColumnBlob

Would it be better to abandon TQuery in this case and use IB_DSQL or
IB_Cursor to access the Blob;

Thanks in Advance

Jack Engleman

function CheckAvailability(var InHouse, OnOrder: Integer; PickupDate,
BackDate: TDate; const Style, Size, Store: String): Integer;
var
BlobInfo: array[1..NUM_OF_DAYS] of SmallInt;
BS: TBlobStream;
PDate,CDate: Integer;
lcv: Integer;
begin
DataModule_Available := TDataModule_Available.Create(Application);
Result := -100000;
try
if (PickupDate < 20000) then
begin
PickupDate := Date;
end;
with DataModule_Available.Query_AvStoreRecs do
begin
Close;
ParamByName('S').AsString := Style;
ParamByName('SI').AsString := Size;
ParamByName('ST').AsString := Store;
Open;
First;
if not Eof then
begin
// PutDebugMes('Check Avail 2 ' + Style + ' ' + Size + ' '
+ InttoStr(Result));
InHouse := FieldByName('STORE_INV').AsInteger;
BS := TBlobStream.Create(FieldByName('DAYS_OUT') as
TBlobField,bmRead);
try
BS.Seek (0,soFromBeginning);
BS.Read (BlobInfo,SizeOf(BlobInfo));
Finally
BS.Free;
end;