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 .
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 .