Page 1 of 1

Oracle error codes

Posted: Mon 30 May 2005 07:24
by Guest
Is there any way to get the last Oracle error code from the driver?

I know that lack of error codes is DbExpress' limitation, but is there any workaround for this with your Oracle driver? May be some Oracle SQL statement can do this?

Thanks!

Oracle error codes

Posted: Mon 30 May 2005 09:45
by Guest
If parsing the error string is the only solution, could you please modify the error message the driver generates to something like the following:

DbxOda error:
Message:

This way it will be easy to parse the error code out of the string - the error code will always be formatted the same way by the driver (oracle error messages can be localized).
Also, the 'DbxOda' string in the message will allow to easy tell apart driver's messages and dbexpress' own messages.

Posted: Tue 31 May 2005 13:40
by Paul
Oracle errors have recognizable format. For example

Exception.Message = 'ORA-00942: table or view does not exist'

= 00942
= table or view does not exist

Sometimes you can get error message from "Oracle Net (Core Lab)" in the following format (starting from "NET:")
Exception.Message = 'NET: Invalid host'