/// <summary> /// Rollback the active transaction. Transactions may be nested. /// </summary> public override void RollbackTransaction() { VistaDBSQLQuery query = CreateSQLQuery(); query.SQL = "ROLLBACK TRANSACTION"; query.ExecSQL(); query.DropQuery(); }
/// <summary> /// Begin a transaction. Transactions may be nested. /// </summary> public override bool BeginTransaction() { VistaDBSQLQuery query = CreateSQLQuery(); query.SQL = "BEGIN TRANSACTION"; query.ExecSQL(); query.DropQuery(); return(true); }
/// <summary> /// Commit an active transaction. Transactions may be nested. /// </summary> public override bool CommitTransaction() { VistaDBSQLQuery query = CreateSQLQuery(); query.SQL = "COMMIT TRANSACTION"; query.ExecSQL(); query.DropQuery(); return(true); }
/// <summary> /// Executes a V-SQL statement against the connection and returns the number of rows affected. /// </summary> public int ExecuteNonQuery() //IDbCommand.ExecuteNonQuery { if ((connection == null || connection.State != ConnectionState.Open) && (commandText.Substring(0, 6).ToUpper() != "CREATE")) { throw new VistaDBException(VistaDBErrorCodes.ConnectionInvalid); } if (sqlQuery == null) { sqlQuery = connection.VistaDBSQL.NewSQLQuery(); } sqlQuery.SQL = commandText; AddSQLParameter(sqlQuery); sqlQuery.ExecSQL(); return(sqlQuery.RowsAffected); }