db2_conn_errormsg
PECL ibm_db2 >= 1.0.0
db2_conn_errormsg - Returns the last connection error message and SQLCODE value
Code Examples
Example #1 Retrieving the error message returned by a failed connection attempt
Result: [IBM][CLI Driver] SQL1013N The database alias name
or database name "BADNAME" could not be found. SQLSTATE=42705
SQLCODE=-1013