On Mon, Aug 17, 2015 at 9:19 PM, PSequel Support <support@psequel.com> wrote:
There seems to be a bug in the SQLGetDiagRec function - it always returns the oldest error message. For example, after I run two invalid queries, calling SQLGetDiagRec gives me the error message for the first query instead of the second one. However, according to the specs,
SQLGetDiagRec retrieves only the diagnostic information most recently associated with the handle specified in the Handle argument. If the application calls another ODBC function, except SQLGetDiagRec,SQLGetDiagField, or SQLError, any diagnostic information from the previous calls on the same handle is lost.