public void CompleteTransaction() { useTransaction = false; _transaction.Commit(); _transaction.Dispose(); _transaction = null; }
public void EndTransaction(bool blnCommit) { try { if (blnCommit == true) { objTransaction.Commit(); } else { objTransaction.Rollback(); } } catch (Exception ex) { objException = ex; } finally { //objClear.CleanupPooledConnections(); objConnection.Close(); objTransaction.Dispose(); objTransaction = null; blnTrans = false; if (objCommand is object) { objCommand.Dispose(); objCommand = null; } } }
/// <summary> /// Ends the transaction and disposes any unhandled transaction object /// </summary> /// <param name="err">The error object as ref</param> /// <param name="givenTransaction">The given transaction.</param> public void EndTransaction(DestinationDatabase destinationDatabase, ref ErrorObj err, iDB2Transaction givenTransaction) { if (!(givenTransaction.Connection == null)) { givenTransaction.Dispose(); givenTransaction = null; } err = ConnectionByDestinationDBClose(destinationDatabase); }
/// <summary> /// Ends the transaction and disposes any unhandled transaction object and closes the reader object /// </summary> /// <param name="err">The error object as ref</param> /// <param name="givenTransaction">The given transaction.</param> /// <param name="readerToClose">The reader to close.</param> public void EndTransaction(DestinationDatabase destinationDatabase, ref ErrorObj err, iDB2Transaction givenTransaction, iDB2DataReader readerToClose) { if (!(givenTransaction.Connection == null)) { givenTransaction.Dispose(); givenTransaction = null; } if (!(readerToClose == null)) { if (!(readerToClose.IsClosed)) { readerToClose.Close(); } readerToClose.Dispose(); } err = ConnectionByDestinationDBClose(destinationDatabase); }
private void EliminaTransaccion() { _Transaccion.Dispose(); _Transaccion = null; }