Re: Is there a table containing ORACLE error codes?

From: Alvin W. Law <alaw_at_oracle.com>
Date: Thu, 18 Mar 1993 06:33:15 GMT
Message-ID: <ALAW.93Mar17223315_at_ap221sun.oracle.com>


andrew_at_cnw01.storesys.coles.oz.au (Andrew May) writes:

>In <1nq7vnINNnp6_at_ef2007.efhd.ford.com> wwm_at_ef5003.efhd.ford.com (Bill Meahan) writes:

>>Is there a table in ORACLE (or some other mechanism) by which a user
>>program could get the short description of an ORACLE error given the
>>error code number?
 

>>That is, if I get an error of 1401 (or 01401) is there some way I can
>>obtain the short description:
>> Inserted value to large for column
>>without resorting to the ORACLE Error Messages and Codes Manual?
 

>>I'd like to provide something meaningful to my users.
 

>>Note: I am NOT using SQL*Forms (and will not convert my client/server
>>applications to SQL*Forms).
 

>Bill,
> I assume when you say "user program" that you are using one of the
>Oracle programmatic interfaces such as Pro*Cobol.
 

>If you are using Pro*cobol, you include the sqlca library. This includes
>a variable called SQLCODE which is the Oracle error code returned (e.g. 1401)
>and SQLERRMC which is the text of the error. I would expect all the
>supported 3gl's to have a similar include file.

SQLCA.SQLERRM.SQLERRMC only stores the error message as recorded in SQLCA. If you call a stored procedure through embedded PL/SQL, you can trap a sqlerror inside your procedure and passes the calling module the sqlcode using a bind variable without SQLCA knowing anything about the sqlerror occured inside the stored procedure. In this case, it would be necessary for a function / lookup table for the error message text.

--
 Alvin W. Law .............................................. Oracle Corporation
 Senior Software Engineer ...................... 300 Oracle Parkway, Box 659306
 Manufacturing Applications .......................... Redwood Shores, CA 94065
 Email: alaw_at_oracle.com ...... Voice: +1 415.506.3390 .... Fax: +1 415.506.7299
Received on Thu Mar 18 1993 - 07:33:15 CET

Original text of this message