Board index » delphi » Getting error info from Oracle

Getting error info from Oracle

Hi,

I'm trying to trap error messages coming back from Oracle, but don't
know if they're available or if I can get them.

Say if I attempt to log on as 'widget', when that user does not exist.
Using SQL Plus I get:
ERROR:
ORA-01017: invalid username/password; logon denied

But trapping the error using EDBEngineError and logging on in Delphi I
get these 2 errors:

General SQL Error

ORA-01012: not logged on

NativeError returns the same.

Can anyone tell me how to get the Oracle error?

TIA

Steve.

 

Re:Getting error info from Oracle


Quote
On Thu, 02 May 2002 11:26:42 GMT, s...@nojunk.com (Steve) wrote:
>Hi,

>I'm trying to trap error messages coming back from Oracle, but don't
>know if they're available or if I can get them.

>Say if I attempt to log on as 'widget', when that user does not exist.
>Using SQL Plus I get:
>ERROR:
>ORA-01017: invalid username/password; logon denied

>But trapping the error using EDBEngineError and logging on in Delphi I
>get these 2 errors:

>General SQL Error

>ORA-01012: not logged on

>NativeError returns the same.

>Can anyone tell me how to get the Oracle error?

>TIA

>Steve.

Ok, well I've found an answer to this.  It seems that when using the
newer Oracle 8 driver SQLORA8.DLL a different function is called
resulting in different, and not very helpful, error messages.  Using
the older SQLORA32.DLL solves this problem.  Here is a link that
explains it: http://www.delphi32.com/info_facts/faq/faq_970.asp

Steve.

Other Threads