DML error logging

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
a-s-z
Posts: 106
Joined: Wed 03 Dec 2008 06:01

DML error logging

Post by a-s-z » Thu 01 Apr 2010 07:10

Hello,

is it possible to use the error logging feature of oracle 10g (dbms_errlog) with ODAC when using dynamic generated update sql? Or do I have to construct the update sql statically to use this feature?

An additional property "ErrorTable" or similar for TOraQuery would be nice!

bork
Devart Team
Posts: 649
Joined: Fri 12 Mar 2010 07:55

Post by bork » Fri 02 Apr 2010 13:20

ODAC doesn't support error logging feature of Oracle 10g (dbms_errlog). But you can use TOraErrorHandler for catching and logging all Oracle errors.

We will think about support error logging feature and will try to implement it in the future.

a-s-z
Posts: 106
Joined: Wed 03 Dec 2008 06:01

Post by a-s-z » Tue 06 Apr 2010 07:19

Hello,

when using TOraErrorHandler, I do not get the row data received the server.
I have added the "log errors" clause to the corresponding insert statement, but so I cannot use Odac's feature of dynamic query generation...

I have generated the insert query in the following way:

Code: Select all

    with TDBAccessUtils.GetDataSetService(AQuery).SQLGenerator do
    begin
      AQuery.SQLInsert.Text := GenerateSQL(stInsert, False, nil);
      if AQuery.SQLInsert.Count > 0 then
      begin
        AQuery.SQLInsert.Append('  LOG ERRORS REJECT LIMIT UNLIMITED');
        AQuery.DMLRefresh := False;
        AQuery.Options.StrictUpdate := True;
      end;
    end;

Post Reply