diff options
-rw-r--r-- | libodbcpp/odbc-modifycommand.cpp | 2 | ||||
-rw-r--r-- | libodbcpp/unittests/testodbc.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/libodbcpp/odbc-modifycommand.cpp b/libodbcpp/odbc-modifycommand.cpp index 0c49f92..0eeca01 100644 --- a/libodbcpp/odbc-modifycommand.cpp +++ b/libodbcpp/odbc-modifycommand.cpp @@ -21,7 +21,7 @@ ODBC::ModifyCommand::execute(bool anc) throw Error(rc, SQL_HANDLE_STMT, hStmt); } } - SQLLEN rows; + SQLLEN rows = 0; rc = SQLRowCount(hStmt, &rows); if (!SQL_SUCCEEDED(rc)) { throw Error(rc, SQL_HANDLE_STMT, hStmt); diff --git a/libodbcpp/unittests/testodbc.cpp b/libodbcpp/unittests/testodbc.cpp index f235cfb..bb6fd97 100644 --- a/libodbcpp/unittests/testodbc.cpp +++ b/libodbcpp/unittests/testodbc.cpp @@ -49,7 +49,7 @@ BOOST_AUTO_TEST_CASE( bindAndSend ) mod->bindParamS(2, testString); mod->bindParamB(3, testBool); mod->bindParamT(4, testDateTime); - mod->execute(); + BOOST_CHECK_EQUAL(1, mod->execute()); } BOOST_AUTO_TEST_CASE( bindAndSelect ) |