Exemplo n.º 1
0
        internal Int32 IncrementAndObtainOpenResultCount(SqlInternalTransaction transaction)
        {
            _hasOpenResult = true;

            if (transaction == null)
            {
                // If we are not passed a transaction, we are not executing under a transaction
                // and thus we should increment the global connection result count.
                return _parser.IncrementNonTransactedOpenResultCount();
            }
            else
            {
                // If we are passed a transaction, we are executing under a transaction
                // and thus we should increment the transaction's result count.
                _executedUnderTransaction = transaction;
                return transaction.IncrementAndObtainOpenResultCount();
            }
        }
 internal int IncrementAndObtainOpenResultCount(SqlInternalTransaction transaction)
 {
     this._hasOpenResult = true;
     if (transaction == null)
     {
         return this._parser.IncrementNonTransactedOpenResultCount();
     }
     this._executedUnderTransaction = transaction;
     return transaction.IncrementAndObtainOpenResultCount();
 }