internal void EnlistTransactionInternal(SysTx.Transaction transaction)
        {
            SysTx.IDtcTransaction oleTxTransaction = ADP.GetOletxTransaction(transaction);

            using (ITransactionJoinWrapper transactionJoin = ITransactionJoin())
            {
                if (null == transactionJoin.Value)
                {
                    throw ODB.TransactionsNotSupported(Provider, (Exception)null);
                }
                transactionJoin.Value.JoinTransaction(oleTxTransaction, (int)IsolationLevel.Unspecified, 0, IntPtr.Zero);
                _unEnlistDuringDeactivate = (null != transaction);
            }
            EnlistedTransaction = transaction;
        }
예제 #2
0
        internal void EnlistTransactionInternal(SysTx.Transaction transaction)
        {
            OleDbConnection.VerifyExecutePermission();

            SysTx.IDtcTransaction oleTxTransaction = ADP.GetOletxTransaction(transaction);

            IntPtr hscp;

            Bid.ScopeEnter(out hscp, "<oledb.ITransactionJoin.JoinTransaction|API|OLEDB> %d#\n", ObjectID);
            try {
                using (ITransactionJoinWrapper transactionJoin = ITransactionJoin()) {
                    if (null == transactionJoin.Value)
                    {
                        throw ODB.TransactionsNotSupported(Provider, (Exception)null);
                    }
                    transactionJoin.Value.JoinTransaction(oleTxTransaction, (int)IsolationLevel.Unspecified, 0, IntPtr.Zero);
                    _unEnlistDuringDeactivate = (null != transaction);
                }
            }
            finally {
                Bid.ScopeLeave(ref hscp);
            }
            EnlistedTransaction = transaction;
        }
        internal void EnlistTransactionInternal(Transaction transaction)
        {
            IntPtr          ptr;
            IDtcTransaction oletxTransaction = ADP.GetOletxTransaction(transaction);

            Bid.ScopeEnter(out ptr, "<oledb.ITransactionJoin.JoinTransaction|API|OLEDB> %d#\n", base.ObjectID);
            try
            {
                using (ITransactionJoinWrapper wrapper = this.ITransactionJoin())
                {
                    if (wrapper.Value == null)
                    {
                        throw ODB.TransactionsNotSupported(this.Provider, null);
                    }
                    wrapper.Value.JoinTransaction(oletxTransaction, -1, 0, IntPtr.Zero);
                    this._unEnlistDuringDeactivate = null != transaction;
                }
            }
            finally
            {
                Bid.ScopeLeave(ref ptr);
            }
            base.EnlistedTransaction = transaction;
        }