A negative SQLCODE indicates that a SQLERROR has occurred while executing a call into the EDB2.DLL. When an error occurs in the DB/Assist generated action routines, EDB2Error_BV is set to TRUE and (by default) a call is made to the action routine EDB2WheneverError. This routine is located in the EDB2.INC file. This action routine will write all the information that is stored in the ESQLCA structure into the errorlog, retrieve the error message that corresponds to the SQLCODE and rollback the database to its previously saved state.