MySQL C++コネクタバージョン1.1.0を使用しています。 これは以下のように私のコードがどのように見えるかです:例外は、次の出力とスローされMySQL C++コネクタMySQL_Prepared_Statement :: getUpdateCountエラー
PreparedStatement *pStatement;
connection->setAutoCommit(false);
pStatement = connection->prepareStatement("UPDATE records "
"SET is_processed = ? "
"WHERE id = ?");
//LOOP BEGIN
pStatement->setInt(1, is_processed);
pStatement->setString(2, record_id);
pStatement->execute();
//LOOP END
int updated_records;
try
{
updated_records = pStatement->getUpdateCount();
}
catch(SQLException&e)
{
cout << "ERROR: " << e.what();
cout << " (MySQL error code: " << e.getErrorCode();
cout << ", SQLState: " << e.getSQLState() << ")" << endl;
}
connection->commit();
connection->setAutoCommit(true);
:
ERROR: MySQL_Prepared_Statement::getUpdateCount (MySQL error code: 0, SQLState:)
だから、全く何も言います。 getUpdateCount()
の何が問題なのですか?私はより詳細なエラー報告レベルを得ることができるいくつかの方法はありますか?
EDIT
行は、MySQLのC++コネクタを使用してカウント更新取得するために他の方法はありますか?