Page 1 of 1

How to catch exceptions occured while TOraQuery.Execute?

Posted: Fri 02 Sep 2005 12:30
by Guest
hi there,

i wrote a daemon using the toraquery class to insert data in a database. if the database goes down or the session dies for some reason i want to catch the EOraError Exceptions.

code is similar to:

try
toraquery.Execute;
Except on EOraError do begin
do some error handling
end;

i can see that an execption occurs in the delphi debugger when i kill the oracle session, but for any reason the exception is not raised and no error handling is done. can you suggest any way to catch the exception?

thx and br, klaus eckhardt.

Posted: Mon 05 Sep 2005 12:58
by Alex
You can use TOraErrorHandler component or TOraSession.OnError event handler for such tasks.

thank you for your suggestion

Posted: Tue 06 Sep 2005 13:38
by Guest
thank you for your suggestion. it was not so simple, but at last it works.
br, klaus.