Hi,
I m currently using mysqlpp in a MFC/Windows/C++ project , and I
experiencing exceptions while calling sub queries:
Here is the error I get if I activate exceptions:
Unhandled exception at 0x75acb760 in UA_OnlineTracking.exe: Microsoft
C++ exception: mysqlpp::BadQuery at memory location 00012ebc8..
My Code :
ITF::String GetSingleField(mysqlpp::Connection & c,const char *sql){
ITF::String out = "";
mysqlpp::Query query = c.query(sql);
mysqlpp::Row row;
if (mysqlpp::UseQueryResult res = query.use()) {
row = res.fetch_row();
out = MPP_TO_ITF_STRING( row.at(0) );
}
return out;
}
Looks like the if statement is never ( query.use() ) is never excecuted
, even if I run a very simple query like "SELECT 1;"
If there a specific way to handle subqueries?
Best Regards,
Nicolas