List:MySQL++« Previous MessageNext Message »
From:Access-Dev Date:July 4 2011 10:29am
Subject:exception in subqueries
View as plain text  

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( );


       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,

exception in subqueriesAccess-Dev4 Jul
  • Re: exception in subqueriesJonathan Wakely4 Jul
    • Re: exception in subqueriesAccess-Dev4 Jul
      • RE: exception in subqueriesShaun Brown4 Jul
        • Re: exception in subqueriesAccess-Dev4 Jul
          • Re: exception in subqueriesWarren Young5 Jul
      • Re: exception in subqueriesJonathan Wakely4 Jul