Example #1
0
        override public void Open()
        {
            InnerConnection.OpenConnection(this, ConnectionFactory);

            // SQLBUDT #276132 - need to manually enlist in some cases, because
            // native ODBC doesn't know about SysTx transactions.
            if (ADP.NeedManualEnlistment())
            {
                EnlistTransaction(SysTx.Transaction.Current);
            }
        }
Example #2
0
        public override void Open()
        {
            InnerConnection.OpenConnection(this, ConnectionFactory);

            // need to manually enlist in some cases, because
            // native OLE DB doesn't know about SysTx transactions.
            if ((0 != (ODB.DBPROPVAL_OS_TXNENLISTMENT & ((OleDbConnectionString)(this.ConnectionOptions)).OleDbServices)) &&
                ADP.NeedManualEnlistment())
            {
                GetOpenConnection().EnlistTransactionInternal(SysTx.Transaction.Current);
            }
        }
Example #3
0
        public override void Open()
        {
            try
            {
                InnerConnection.OpenConnection(this, ConnectionFactory);
            }
            catch (DllNotFoundException e) when(!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
            {
                throw new DllNotFoundException(SR.Odbc_UnixOdbcNotFound + Environment.NewLine + e.Message);
            }

            // SQLBUDT #276132 - need to manually enlist in some cases, because
            // native ODBC doesn't know about SysTx transactions.
            if (ADP.NeedManualEnlistment())
            {
                EnlistTransaction(SysTx.Transaction.Current);
            }
        }