Subject RE: [ib-support] Using Blobs and Delphi
Author Theo Bebekis
Jason

> Care must be taken when dealing with BLOB columns as input parameters. Are
> you passing what will end up as the contents of the BLOB or the ID of the
> BLOB. In IBO, if you are using input parameters and BLOB's it will get a
new

I'm passing the content as

IBStoredProc1.StoredProcName := 'SP_ADD_DATA';
IBStoredProc1.Prepare;
IBStoredProc1.ParamByName('ID').AsInteger := M.Age;
IBStoredProc1.ParamByName('DATA').LoadFromStream(MS, ftBlob);

CREATE PROCEDURE sp_ADD_DATA(ID INTEGER, DATA BLOB) AS
BEGIN
INSERT INTO BLOBTEST VALUES (:ID, :DATA);
END ^

Is there any danger in the above?

Is the following case, using a IBQuery, safer?

IBQuery1.SQL.Add('INSERT INTO BLOBTEST VALUES (:ID, :DATA)');
IBQuery1.Prepare;
IBQuery1.ParamByName('ID').AsInteger := M.Age;
IBQuery1.ParamByName('DATA').LoadFromStream(MS, ftBlob);
IBQuery1.ExecSQL;


Regards
Theo
-----------------------------------
Theo Bebekis
Thessaloniki, Greece
bebekis@...
-----------------------------------

>