Inserting blobs into a package procedure

Hi,

I am trying to insert a record containing a blob field.

There is a package containing a procedure which does the actual inserting.

I have used the package wizard for this package.

I am trying to get a TLobLocator to play ball!

We wish to insert a picture into this field so we are doing the following:

procedure Tfrmstampedit.btnsaveClick(Sender: TObject);
var
Lob : TLobLocator;
begin
if FNew = true then
begin
try
Lob := TLobLocator.Create(OracleSession1, otBLOB);
Lob.SetEmpty;
// InsertStamp is the procedure in the package
tvis1.Insertstamp(edtname.Text, edtdescription.text, Lob);
Lob.LoadFromFile(OpenDialog1.FileName);
finally
Lob.Free;
end;
end;
end;

we have tried with and without the lob.setempty line and the result is this:

with Lob.SetEmpty:
ORA-22275: Invalid LOB locator specified

without Lob.SetEmpty:
TLobLocator: Invalid handle

Please Help
smile.gif


Delphi 5 / Oracle 8.1.6 / DOA 3.4.3

Thanks

Alex Scott
 
My guess is that the actual insert does not return an initialized BLOB. See
this topic
for a complete example.

------------------
Marco Kalter
Allround Automations
 
Back
Top