public bool TransactionCommit() { if (_SqlConnection.State != System.Data.ConnectionState.Open || _SqlCommand.Connection == null || _SqlTransaction == null) { throw new Exception("Connection or transaction not initialised"); } try { _SqlTransaction.Commit(); } catch (Exception ex) { LogFault("Transaction Commit failed.", ex, false); } _SqlCommand.Transaction = null; try { _SqlTransaction.Dispose(); } catch { } _SqlTransaction = null; return(true); }
/// <summary> /// You have to hold the CoverMutex when calling this! /// </summary> private void _CommitCovers() { if (_TransactionCover == null) { return; } _TransactionCover.Commit(); _TransactionCover.Dispose(); _TransactionCover = null; }