TMySQLxxConnection, TSQLquery and MySQLErrno lazarus / 16-Databases ---------------------------------------------------------------------- GillesH · 2016-11-21 07:52 Hello, Is it possible to obtain MySQL_ERRNO in a DataBase Exception ? Thanks. ---------------------------------------------------------------------- LacaK · 2016-11-22 18:07 It depends on exception class. If exception raises MySQLxxConnection then exception should be ESQLDatabaseError. This exception class has fields: - ErrorCode which is MySQLErrNo - SQLState But if exception for example raises TDataSet then exception is of type EDatabaseError, which of course cann't contain MySQL error number.