SQL error messages reported during program execution are directed to standard error output. Refer to your SQL reference manual for the meanings of SQL error messages. Programmers can check for error codes in their programs by examining the values of SQLSTATE and SQLCODE.
Note that some MySQL drivers do not correctly clear their error buffers after reporting an error. This can cause the driver to produce an infinite loop reporting the same error message. If you keep receiving the same error message over and over, this could be the source of the problem. Check with your driver manufacturer for detail.
For error messages generated by DB2 Connect or other connectivity software, refer to your product documentation.