INF: dberrorhandle and dbmsghandle Error-Handling Routines

ID Number: Q45234

1.10 1.11 4.20

OS/2

Summary:

This article explains why the error-handling routine is not called by

DB-LIBRARY (db-lib) when an error occurs on the SQL Server.

More Information:

The db-lib user-installed error handler is called whenever db-lib has

a serious problem. It neither sends nor receives anything to or from

the SQL Server. Db-lib reports problems such as a broken connection

with the server, no response from the server after a specified time

interval, out-of-memory conditions in the workstation when attempting

to read and store data from the server, and so forth. There is nothing

you can do from within db-lib that affects the SQL Server, except to

wait another interval or to terminate the process and break the

connection.

It is the db-lib user-installed message handler that receives error

and informational messages from SQL Server, and doesn't have much

power over what the server does. It can, however, set a flag that can

be tested once the dbsqlexec returns control to the application (no

db-lib calls are permitted within dbmsghandler). Based on the setting

of the flag, the application could issue dbcancel or possibly dbexit.

Additional reference words: 1.10 1.11 4.20 dblib