MySQL Forums
Forum List  »  Connector/C++

command out of sync
Posted by: tom tony
Date: June 04, 2014 07:39PM

I use C++ connector to connection with MYSQL.But when I want to execute two query in one connection ,It tell me command out of sync.I didn't use auto_ptr like connection document.This is my code:

pstmt = conn->preparedStatement("Call a(?)");
....
res = pstmt->executeQuery();
..
delete res;
delete pstmt;
pstmt = conn->preparedStatement("Call b(?)");
//ERROR:It tells me Commands out of sync.

why I can't execute it?Can you give me a right way to do it .

Options: ReplyQuote


Subject
Views
Written By
Posted
command out of sync
2032
June 04, 2014 07:39PM


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.