Alex Scott
Member
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
Delphi 5 / Oracle 8.1.6 / DOA 3.4.3
Thanks
Alex Scott
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

Delphi 5 / Oracle 8.1.6 / DOA 3.4.3
Thanks
Alex Scott