List:MySQL++« Previous MessageNext Message »
From:William F. Dowling Date:June 13 2007 3:30pm
Subject:RE: mysql++ and stored procedures
View as plain text  
On Tue, 2007-06-12 at 17:16 -0500, Jim Wallace wrote:
> I call them all them time.  There are a couple gotcha about using stored
> procs.  First you need to setup to get multiple reset sets, which is a
> MySQL requirement:

Thank you!  I took the '::Option' out of this line
    m_conn->set_option(Connection::Option::opt_reconnect, true);

and followed your advice about pulling off the empty result set by
    while (query.more_results()) {
    // throw away empty results that are side effect of multi-query
        res = query.store_next();
Without that I had been seeing
   Query error: Commands out of sync; you can't run this command now

Also looked at examples/multiquery.cpp as Warren Young pointed out.

Everything working now.  Thanks for your help and to to the mysqlpp team
for a very nice piece of OSS software!


William F Dowling
mysql++ and stored proceduresWilliam F. Dowling12 Jun
  • RE: mysql++ and stored proceduresJim Wallace12 Jun
    • RE: mysql++ and stored proceduresWilliam F. Dowling13 Jun
  • Re: mysql++ and stored proceduresWarren Young13 Jun