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?
ORA-00600: inserting binary data into blob on Oracle 10g
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.
- 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.
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.
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.