Ejemplo n.º 1
0
 /// <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);
 }