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.

Database:
database.png

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) {
		//printf(mysql_error(connection));
		completed = false;
		message = mysql_error(connection);
	}

Here is my current code. // Fill out your copyright notice in the Description page of Project Settings. - Pastebin.com
Sorry for my bad english.