ADOCE can generate both ADO errors and SQL errors. ADO errors occur when the methods and properties of the ADOCE control are used improperly, such as trying to update a read-only recordset. SQL errors are generated when there is an error in the SQL statements used in the Open method.
Errors are caught by using the On Error Resume Next statement along with inline error trapping. After you perform an operation, you can check for errors inline by looking at the Err object to see if Err.Number is nonzero. Using the error code returned in Err.Number, you can handle each error appropriately, whether it is an SQL error or an ADO error.