Supplies a user function to handle Microsoft® SQL Server™ messages for a specific DBPROCESS connection.
DBMSGHANDLE_PROC dbprocmsghandle (
PDBHANDLE pdbhandle,
DBMSGHANDLE_PROC message_handler)
If pdbhandle is a DBPROCESS, a pointer to the previously installed connection message handler is returned. This can be NULL.
If pdbhandle is a LOGINREC, a pointer to the newly installed connection message handler is returned, or NULL if this function fails.
This function is similar to the dbmsghandle function. While dbmsghandle installs a message handler global to the entire DB-Library application, dbprocmsghandle installs a message handler for a specific DBPROCESS connection.
When DB-Library receives a message from SQL Server using a connection that has a connection message handler (installed using dbprocmsghandle), only the connection message handler is called. The application message handler is not called. Because a connection message handler is associated with a connection and is not global to the entire DB-Library application, the connection message-handler code does not need to protect against reentrancy by DB-Library.
Note that this function is not supported for Microsoft MS-DOS®.
dbmsghandle |