Installing an Error-Message Handler

Install an error-message handler implementing SybMessageHandler by calling the setMessageHandler method from SybDriver, SybConnection, or SybStatement.

If you install an error-message handler from SybDriver, all subsequent SybConnection objects inherit it. If you install an error-message handler from a SybConnection object, it is inherited by all SybStatement objectscreated by that SybConnection.

This hierarchy only applies from the time the error-message handler object is installed. For example, if you create a SybConnection object called “myConnection,” and then call SybDriver.setMessageHandler to install an error-message handler object, “myConnection” cannot use that object.

To return the current error-message handler object, use getMessageHandler.