From 63d9cbb434ec4f6e828083b99d638127cfce7a95 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 24 Dec 2015 04:08:56 +0000 Subject: ODBC files prefixed with odbc- --- libodbcpp/modifycommand.cpp | 40 ---------------------------------------- 1 file changed, 40 deletions(-) delete mode 100644 libodbcpp/modifycommand.cpp (limited to 'libodbcpp/modifycommand.cpp') diff --git a/libodbcpp/modifycommand.cpp b/libodbcpp/modifycommand.cpp deleted file mode 100644 index 7a39be5..0000000 --- a/libodbcpp/modifycommand.cpp +++ /dev/null @@ -1,40 +0,0 @@ -#include "modifycommand.h" -#include "error.h" - -ODBC::ModifyCommand::ModifyCommand(const ODBC::Connection & c, const std::string & sql) : - DB::Command(sql), - ODBC::Command(c, sql), - DB::ModifyCommand(sql) -{ -} - -ODBC::ModifyCommand::~ModifyCommand() -{ -} - -unsigned int -ODBC::ModifyCommand::execute(bool anc) -{ - if (connection.txIsAborted()) { - throw Error("Transaction has been aborted, not issuing any more commands"); - } - RETCODE rc = SQLExecute(hStmt); - if (!SQL_SUCCEEDED(rc)) { - if (rc != SQL_NO_DATA || !anc) { - connection.abortTx(); - throw Error(rc, SQL_HANDLE_STMT, hStmt, "ODBC::ModifyCommand::execute SQLExecute"); - } - } - SQLLEN rows; - rc = SQLRowCount(hStmt, &rows); - if (!SQL_SUCCEEDED(rc)) { - connection.abortTx(); - throw Error(rc, SQL_HANDLE_STMT, hStmt, "ODBC::ModifyCommand::execute SQLRowCount"); - } - if (rows > 0 || anc) { - return rows; - } - connection.abortTx(); - throw Error("No rows affected"); -} - -- cgit v1.2.3