The following code fragment implements the VBSQL.VBX VBSQL1_Error and VBSQL1_Message procedures by calling the UserSQLErrorHandler and UserSQLMessageHandler routines defined in code module VBSQLGEN.BAS:
Sub VBSQL1_Error (Sqlconn%, Severity%, ErrorNum%, ErrorStr$, RetCode%)
OsErr% = -1
RetCode% = UserSQLErrorHandler (Sqlconn%, Severity%, ErrorNum%,
OsErr%, ErrorStr$, OsErrStr$)
END SUB
Sub VBSQL1_Message (Sqlconn%, Message&, State%, Severity%, MsgStr$)
UserSQLMsgHandler Sqlconn%, Message&, State%, Severity%, MsgStr$
END SUB
For a list of the code in the routines UserSQLErrorHandler and UserSQLMsgHandler, see the VBSQLGEN.BAS sample code.
For a list of DB-Library for Visual Basic messages, see Error Messages.