Supplies a user function to handle DB-Library errors for a specific DBPROCESS connection.
DBERRHANDLE_PROC dbprocerrhandle (
DBERRHANDLE_PROC error_handler );
Is a DBPROCESS structure or a LOGINREC structure. If this is a DBPROCESS connection, the error_handler will be used for that connection. If this is a LOGINREC structure, the error_handler will automatically be used for all future DBPROCESS connections opened (with dbopen) using the LOGINREC.
A pointer to the user function that is called whenever DB-Library determines that an error has occurred for the existing or future connection specified in pdbhandle. Define the connection error-handler function in exactly the same way as the application error-handler function specified in dberrhandle.
If pdbhandle is a DBPROCESS structure, a pointer to the previously installed connection error handler is returned. This can be NULL.
If pdbhandle is a LOGINREC structure, a pointer to the newly installed connection error handler is returned, or NULL if this function fails.
This function is similar to the dberrhandle function. While dberrhandle installs an error handler global to the entire DB-Library application, dbprocerrhandle installs an error handler for a specific DBPROCESS connection.
When a DB-Library error occurs using a connection that has a connection error handler (installed using dbprocerrhandle), only the connection error handler is called. The application error handler is not called. Because a connection error handler is associated with a connection and is not global to the entire DB-Library application, the connection error-handler code does not need to protect against reentrancy by DB-Library.
Note that this function is not supported for Microsoft MS-DOS®.