BOOLEAN SqlCommitTransaction( __in PSQL_DATABASE Database ) { ULONG Status; Status = SqlExecute(Database, "COMMIT TRANSACTION"); return (Status == SQLITE_OK) ? TRUE : FALSE; }
BOOLEAN SqlRollbackTransaction( __in PSQL_DATABASE Database ) { ULONG Status; Status = SqlExecute(Database, "ROLLBACK TRANSACTION"); return (Status == SQLITE_OK) ? TRUE : FALSE; }
BOOLEAN SqlBeginTransaction( __in PSQL_DATABASE Database ) { ULONG Status; Status = SqlExecute(Database, "BEGIN TRANSACTION"); return (Status == SQLITE_OK) ? TRUE : FALSE; }
EErrorType CDatabaseStatementOdbc::DoExecute( DatabaseResultSPtr & result ) { DatabaseConnectionOdbcSPtr connection = DoGetConnectionOdbc(); if ( !connection ) { DB_EXCEPT( EDatabaseExceptionCodes_StatementError, ERROR_ODBC_LOST_CONNECTION ); } DatabaseResultSPtr pReturn; EErrorType eResult = DoPreExecute(); if ( eResult == EErrorType_NONE ) { eResult = SqlExecute( connection, _statementHandle, std::bind( &CDatabaseStatementOdbc::OnResultSetFullyFetched, this, std::placeholders::_1, std::placeholders::_2 ), _infos, result ); } return eResult; }