C++ Node Mysql Query check.

Hello guys, im trying to make an node that perform Mysql Query.
What i have now is almost working, but only if i use the correct Query.


If i use the query : “Select username from user where id = 2;” Works Great !, But if i use something like this “select username from user where id > 0” or wrong Query like this “select username fbbrom user whertte id > 0” the whole editor crashes.


Maybe this part of the code is wrong ?

state = mysql_query(connection,TCHAR_TO_ANSI(*Query));
if (state != 0) {
		completed = false;
		message = mysql_error(connection);

Here is my current code.
Sorry for my bad english.