List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:December 19 2008 9:00am
Subject:Re: Can a connection be used to execute more than 1 query sequentially(not
concurrently)
View as plain text  
kartik mahajan wrote:
>                                     mysqlpp::Query q(conn->query("CALL
> getsubscriberdata('pri_1000000001@stripped',1)"));
> 
>                                     mysqlpp::StoreQueryResult res =
> q.store(); // This throws exception i.e out of sync

MySQL returns multiple results for a stored procedure call.  Until you 
consume all results, you can't make another query.

If you don't have any use for the other stuff MySQL returns, you can do 
something like this to throw it away:

             while (query.more_results()) {
                 res = query.store_next();
             }
Thread
Can a connection be used to execute more than 1 query sequentially(not concurrently)kartik mahajan19 Dec
  • Re: Can a connection be used to execute more than 1 query sequentially(notconcurrently)Warren Young19 Dec