TOraErrorHandler

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Dougo

TOraErrorHandler

Post by Dougo » Mon 08 Nov 2004 23:42

Hi,
I am updating a table using TOraQuery, no problems. I want to trap the errors, if any, when they return. I presumed TOraErrorHandler was the correct object but I am not sure how to go about it. Have you got a code snippet or something I can use.

Cheers

Paul
Posts: 725
Joined: Thu 28 Oct 2004 14:06

Post by Paul » Wed 10 Nov 2004 07:23

If you want to trap an error generated by TOraQuery please use TOraSession.OnError event.

You can change the text of the error message and make it more friendly using TOraErrorHandler component. Please see ODAC help and MasterDetail demo project to get know how to use TOraErrorHandler component.

Dougo

TOraErrorhandler

Post by Dougo » Thu 11 Nov 2004 21:49

Thanks Paul,
I had looked at the master detail demo prior to putting this message on. Unless I am missing something I could not tell where the message was generated, within the OnError event the case statement only refers to login errors. Do you have any other examples I could view.

Cheers
Dougo

Paul
Posts: 725
Joined: Thu 28 Oct 2004 14:06

Post by Paul » Mon 15 Nov 2004 15:51

You cannot get an information about the object where an exception occurs. ODAC doesn't provide such functionality.

Post Reply