Getting exception while using LOBLocator

Hi,

I am trying to save a binary file into a BLOB column in my Oracle database.

Following is my code:

with qryUpdateObjData do
begin
ClearVariables;
SetVariable('OBJ_NO', inObjNo );
Execute;
LOB := LOBField('ODATA_CONTENT');
LOB.SaveToFile(inTempFile);
Lob.Free;
Close;
end;

Everything works fine till Close call of the TOracleQuery object (i.e. qryUpdateObjData ). There it gives an exception: Access violation.

What am I doing wrong?

I would be pleased, if someone could help me.

Regards
 
You should not free the TLOBLocator instance obtained through TOracleQuery.LOBField. It will be freed by the TOracleQuery.
 
Back
Top