Hi all,
i have a little problem using mysql with the C API.
when i e.g. call the mysql_real_connect with a non-existing user, i would expect an error
like:
'"access denied for user testuser".
Instead, my MessageBox() shows this: "ss denied for user testuser".
this is very strange! The mysql_error() seems to shorten my string!
When calling mysql_errno(conn) for the error number, it returns the number 8192 sometimes.
What error is this? I can't find this in de mysql sources.
example code:
MYSQL *conn = mysql_init(NULL);
if (mysql_real_connect(
conn,
"localhost",
"testuser",
"pass",
"testdb",
0,
NULL,
0) != NULL)
isConnected = true;
else
{
MessageBox(NULL, mysql_error(conn), "error", NULL);
Error();
}
I am using Visual C++, win2k, mysql 3.22.xx (think xx = 29, not sure)
thanks,
Jan Hoeve