Subject Re: [IBO] Passing Blobs to an Insert or Update Query
Author Helen Borrie
At 03:18 AM 8/06/2004 +0000, you wrote:
>Hmmm.... I can't seem to pass blobs to an update or insert query.
>Any ideas?
>
> sQ :=
> 'INSERT into SIGNATURES ' +
> '(SINVLOOKUP, BARCODE) Values '+
> '('+ QuotedStr(sInvLookup) + ', :Barcode)';
> Active := False;
> SQL.Clear;
> SQL.Add(sQ);
> TBlobField(ParamByName('BARCODE')).LoadFromFile(sJPEGFile);
> Active := True;

I seem to recall there's a problem with TBlobField due to some dependency
between the vcl units db.pas (which the TIBO components use) and DBTables
(which TIBO does not use).

Try

TIB_ColumnBlob(ParamByName('BARCODE')).LoadFromFile(sJPEGFile);

An unsolicited comment on your code here: why waste resources by assigning
SQL at runtime and not parameterising *both* of these inputs?

Helen