MySQL Forums
Forum List  »  Connector/C++

Re: Returning 2147483647 and not displaying exception error.
Posted by: Lawrin Novitsky
Date: July 03, 2009 03:16PM


You try to execute >1 statements at once. For that you need to set connection option CLIENT_MULTI_STATEMENTS to true. You need to use connect(sql::ConnectOptionsMap&) ) for that. It should look like following:

sql::ConnectOptionsMap options;

options.insert( std::make_pair( "hostName", host));
options.insert( std::make_pair( "userName", login));
options.insert( std::make_pair( "password", passwd ));
options.insert( std::make_pair( "CLIENT_MULTI_STATEMENTS", true ) );

conn.reset( driver->connect(options) );

Now, you need to use execute - getMoreResults - getResultSet, not executeQuery in this case. smth like:


if ( stmt->getMoreResults() )
rs.reset( stmt->getResultSet() );


last little one thing - you don't have field "_currId", but "currId"

and the last thing- if you do everything like i showed... you won't get working code :) because we found some serious bug. i'll push fix of it on sunday-monday. you will need to build c/c++ driver from latest sources to make your code work.
so, thank you - w/out your post that bug would probably stay hidden for some more time.


Options: ReplyQuote

Written By
Re: Returning 2147483647 and not displaying exception error.
July 03, 2009 03:16PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.