Oracle Insert Blob error

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
MoonApple
Posts: 2
Joined: Sun 13 Feb 2011 16:06

Oracle Insert Blob error

Post by MoonApple » Sun 13 Feb 2011 16:21

Oracle 8.17 + unidac .3.00.0.10 + Delphi 2009

Code:
UniQuery.SQL.Add('Insert Into FileDate (BFile,FileType) Values(EMPTY_BLOB(),:FileType) Returning BFile Into :BFile');
UniQuery.ParamByName('FileType').AsInteger := PIC;
UniQuery.ParamByName('BFile').ParamType := ptInput;
UniQuery.SpecificOptions.Values['TemporaryLobUpdate'] := 'True';
UniQuery.ParamByName('BFile').LoadFromFile(FileName,ftOraBlob);
UniQuery.Execute;

there is a problem with Query.Execute;

ErrorMassage:
'ORA-22275:invalid LOB locator specified
ORA-06512:at "SYS.DBMS_LOB", line 686
ORA-06512:At line 1'

Thanks for the help!

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Mon 14 Feb 2011 08:57

Hello,

To resolve this problem you should set the TemporaryLobUpdate specific option to false.

MoonApple
Posts: 2
Joined: Sun 13 Feb 2011 16:06

Thank's AlexP!

Post by MoonApple » Mon 14 Feb 2011 15:54

The problem have solved!
Thank you for help!

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Tue 15 Feb 2011 07:51

Hello,

It is good to see that this problem was solved. If any other questions come up, please contact us.

Post Reply