Page 1 of 1

DML error logging

Posted: Thu 01 Apr 2010 07:10
by a-s-z
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!

Posted: Fri 02 Apr 2010 13:20
by bork
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.

Posted: Tue 06 Apr 2010 07:19
by a-s-z
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;