A script-enabled browser is required for this page to function properly.

Checking DBMS_ERROR_TEXT and DBMS_ERROR_CODE

From within an ON-ERROR trigger, you can check to see if the ERROR_CODE function reports any of the following database-related errors:

40501: ORACLE err - unable to reserve record for update or delete

40502: ORACLE err - unable to read List of values

40505: ORACLE err - unable to perform query

40504: ORACLE err - unable to execute a gname trigger

40506: ORACLE err - unable to check for record uniqueness

40507: ORACLE err - unable to fetch next query record

40508: ORACLE err - unable to INSERT record

40509: ORACLE err - unable to UPDATE record

40510: ORACLE err - unable to DELETE record

40511: ORACLE err occurred while executing a gname trigger

40512: ORACLE err - unable to issue SAVEPOINT command

40513: ORACLE err - unable to get Date/time from database

Once you know that some database error has caused form processing to fail, you can interrogate the DBMS_ERROR_TEXT and DBMS_ERROR_CODE functions to determine exactly which error has occurred. The full text of the error message is available in the return value for DBMS_ERROR_TEXT.


About using PL/SQL exception handling in triggers

About trigger failure results

About evaluating the success or failure of Built-ins