Hello everyone.
I already know the C code required to use SQL statements within C++. Using mysql_real_connect, I was able to establish a connection to a remote MySQL server. The problem is, even though mysql_real_connect did not RETURN NULL, (meaning that a connection to the mysql server was established) I am unable to create databases, OR new tables using the MySQL handle obtained (via the mysql_real_connect function).
int errorcheck;
errorcheck = mysql_real_connect(conn, "myipaddress", "myusername", "mypassword", NULL, 0, NULL, 0);
if (errorcheck != NULL)
{MessageBox(hWnd, "Connection to server successful!", "Connection Status", MB_OK};
Questions:
-Is it possible for mysql_real_connect to not be null, but still be unsuccessful?
-What are the exact return values for: mysql_query, mysql_select_db, and mysql_real_connect?
Notes:
-I have already ensured that "remote" access to the mySQL database was permitted.
-I already know that mysql_real_connect returns NULL if a connection was not established to the MySQL server. However, I do not know if any other return values can be returned other than NULL or success.