When I save a HTML file to ORACLE 10g,the ORA-01460 error occured

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
afy
Posts: 1
Joined: Sun 23 Dec 2007 18:15

When I save a HTML file to ORACLE 10g,the ORA-01460 error occured

Post by afy » Tue 25 Dec 2007 02:38

Hi
I want to store files in oracle,use ODA Trial Edition 6.25.0.12 for Delphi to write the programe.It can run well with ORACLE8 ,9 ,9i.when the program run with ORACLE 10g,it can save all types of file,except HTML. the Error is 'ORA-01460: unimplemented or unreasonable conversion requested'
this is my code:
OraQuery1.Connection:=OraSession1;
OraQuery1.Close;
OraQuery1.SQL.Clear;
s:='E:\ODAC\a.htm';

OraQuery1.SQL.Add('insert into a (htm,reportid,languagecode) values (:aClob,1,''endd'')');
OraQuery1.Params.ParamByName('aClob').AsBlobRef.LoadFromFile(s);
OraQuery1.ExecSQL;

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Tue 25 Dec 2007 08:57

You should either set TemporaryLobUpdate option of TOraQuery to True, or change SQL text to the following:

Code: Select all

insert into a (htm,reportid,languagecode)
values (empty_clob(), 1, 'endd')
returning htm into :aClob

Post Reply