ORA-00600: inserting binary data into blob on Oracle 10g

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
jgoode
Posts: 1
Joined: Fri 27 Apr 2007 13:04

ORA-00600: inserting binary data into blob on Oracle 10g

Post by jgoode » Fri 27 Apr 2007 13:52

We are trying to save a binary file into a blob on Oracle 10g and are getting Ora-0600 and Ora-6502 errors. Here is the code I am using:

oQry := TOraQuery.Create(self);
try

if FbNewObject and FbDirtyData then begin
{Create anm insert statement}
sql := 'INSERT INTO CustInvReport (ReportID, InvoiceNo, Report_File, Invoice_Type, Created_Date, File_Name) VALUES ';
sql := sql + ' (:ReportId, :InvoiceNo, empty_blob(), :InvoiceType, :CreatedDate, :FileName ) ';
sql := sql + ' returning Report_File into :ReportFile';
oQry.SQL.Add(sql);

{Set non-blob columns}
oQry.ParamByName('ReportId').AsInteger := FiReportID;
oQry.ParamByName('InvoiceNo').AsString := FsInvoiceNo;

{Set BLOB column}
oQry.ParamByName('ReportFile').ParamType := ptInput;
oQry.ParamByName('ReportFile').AsOraBlob.LoadFromFile(FsFileName);

{Set non-blob columns}
oQry.ParamByName('InvoiceType').AsInteger := Ord(FeInvoiceType);
oQry.ParamByName('CreatedDate').AsDateTime := FdtCreatedDate;
oQry.ParamByName('FileName').Asstring := FsFileName;



{Execute the SQL}
oQry.Execute;


Result := True;

end;
finally
oQry.Free;
end;

This code works perfect when executed against Oracle 9.x. Any idea why I am getting these errors in 10g?

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

Post by Plash » Sat 28 Apr 2007 14:34

Please supply us the following information
- exact version of ODAC including build number (see Oracle | About ODAC in the Delphi menu);
- exact version of Delphi;
- exact version of the Oracle server and client. You can see it in the Info sheet of TOraSession Editor.
Also specify whether you are using the Net (Direct) option to connect to the database.

HDumas
Posts: 18
Joined: Fri 23 Sep 2005 12:56
Location: Quebec, Canada

Post by HDumas » Tue 17 Jul 2007 19:12

Hello,

we are getting exactly the same problem.

Our ODAC version is 5.50.0.15... Our Delphi version is Delphi 7 with Update 1 and our Oracle version is 10.2.0.3

Yes we are using the net(direct).

Could you please reply as soon as possible as we have been working on this problem for a long time.

Thank you very much.

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

Post by Plash » Wed 18 Jul 2007 12:27

We have fixed several problems with BLOBs in recent ODAC builds. You should upgrade your ODAC to the last build of ODAC 5 (5.80.0.42) or ODAC 6 (6.10.0.9).

Post Reply