Registers an application's error handling routines with the SQL precompiler.
1 – Format
sql_register_error_handler (user-error-routine, user-data)
2 – Returns
No value returned.
3 – Arguments
3.1 – user-error-routine
The address of an application's error handling routine Value: Address of an application's error handling routine Data type: Address Passing By value mechanism:
3.2 – user-data
The address of the user-specified data Value: Address of the user-specified data Data type: Address Passing By value mechanism:
4 – Description
The sql_register_error_handler routine registers the application's error handling routine with SQL. When SQL determines that it will return a negative value for SQLCODE, SQL calls the error handling routine that is currently registered. The standard error handling routines are always in effect, whether special error handling routines have been registered or not. After the error handling routine executes, control returns to SQL. An application can contain and call more than one error handling routine. However, only one routine can be active at a time. An application can use the sql_get_error_handler routine to store the address of a registered routine for use later in the program. To deregister a routine, use the sql_deregister_error_handler routine. For information about declaring the error handling routines in the supported programming languages, see the Oracle Rdb Guide to SQL Programming.
5 – Related Routines
o sql_deregister_error_handler o sql_get_error_handler