Board index » delphi » BLOB as output parameter in Oracle stored procedure?

BLOB as output parameter in Oracle stored procedure?

Hi All

I have a stored procedure like this:

procedure getBLOB(someBLOB OUT BLOB)
IS
BEGIN

   SELECT data INTO someBLOB from dataTable where id=1;

END;

of course it does a bit more than that but thats not important.

now I would like my Delphi program to execute the procedure and save
the return value of "someBLOB" to a file. I have tried this:

var
  bf: TBlobField;
begin

  bf := TBlobField.create(self);
  StoredProcedure.ExecProc;

  bf.value := StoredProcedure.Params[0].asBlob;
  bf.SaveToFile('c:\test.dat');

end;

The StoredProcudure's Params[0] paramtype is set to ftOraBlob.

I get an "Capability not supported" error when executing the
procedure.

Has anyone a clue of what I should do?

thanks in advance

Martin

 

Re:BLOB as output parameter in Oracle stored procedure?


You are severely limited in Oracle in the size of an OUT parameter.  Use
a REF CURSOR and select the blob.

John Pierce

Other Threads