On Fri, 20 Feb 2009 09:36:53 +0100, Lian Cheng
[...]Then here is the problem. MySQL error code is a property of a single MySQL connection. The mysql_errno() and mysql_error() functions both require a MYSQL* connection handle as parameter to retrieve the last error number and error message of the given MySQL connection. And the error messages provided by MySQL API are actually printf format strings. The mysql_error() function fills the format strings with information related to the MYSQL* handle. But in Boost.System, I've got no idea how to pass the connection handle to the error_category::message() function so that a proper error message can be retrieved.
Isn't there a list of error numbers and error strings MySQL uses? I ask as calling error_category::message() should also return an error string even if no MySQL connection is used? Boris