현상: C++ 서버에서 특정 쿼리를 실행할 때마다 Commands out of sync; you can't run this command now. 에러가 발생. 한 로직에서 stmt를 여러개 사용하는데, 첫번째 stmt 사용은 문제 없었고 두번째 stmt 사용시마다 에러가 발생. 원인: 기존 첫번째 stmt 사용하던 소스를 복붙하는 과정에서 stmt2를 사용하지 않고 stmt1을 써서 오류 void func() { sql::PreparedStatement* stmt1 = getstmt(Key1); stmt1->setInt(1, 1); stmt1->executeUpdate(); sql::PreparedStatement* stmt2 = getstmt(Key2); stmt1->setInt(1, 1); stmt..