All of the methods within the YMLD application rely on try/catch blocks to trap any errors that might occur when an SQL statement is issued. The catch block is identical in all of the YMLD methods.
try Odbc methods... Catch se As OdbcException MsgBox(se.Message) end try
There is no need to format the error message because the ODBC driver will create the complete message string. The catch block only displays the error message. A programmer might want to capture the error state to determine what should be done with the error. The YMLD application only displays the error message and then continues. A sample error message is shown in Figure 12-6.