The error-handling interface between your application and DB-Library for Visual Basic is provided by a custom control. When you add this custom control to your application, it installs two error handler event procedures, assigns them the default names VBSQL1_Error and VBSQL1_Message, and supplies the appropriate parameter list as part of each procedure name.
You must explicitly include the DB-Library for Visual Basic procedures for handling errors in your application's primary form before you can use them in your application. These error-handling procedures are contained in the VBSQL.VBX file as part of a custom-control tool that is represented by a stop sign icon in the Toolbox palette. You can place only one error-handler control in an application.
Visual Basic adds the VBSQL.VBX file to your Project window and adds the VBSQL.VBX error handler to the bottom of the Toolbox as a custom control that is shown as a stop sign.
It appears on the form with a default name of VBSQL1. (Since the VBSQL1 custom control requires no action from the user to make it active, you can set its Visible property to FALSE (0) to make it invisible.) The code for the startup form now includes the object VBSQL1 and includes procedure templates for two error event handlers: VBSQL1_Error and VBSQL1_Message.
To implement your error handlers, add code to these event procedures to perform whatever specialized error handling is appropriate to your application. Note that you can also rename the error-handler custom control using the Properties window.