Quantcast
Channel: MySQL Forums - Connector/C++
Viewing all articles
Browse latest Browse all 527

command out of sync (no replies)

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

Viewing all articles
Browse latest Browse all 527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>