Exemple #1
0
        override protected void Deactivate()
        {
            try
            {
                SqlReferenceCollection referenceCollection = (SqlReferenceCollection)ReferenceCollection;
                if (null != referenceCollection)
                {
                    referenceCollection.Deactivate();
                }

                // Invoke subclass-specific deactivation logic
                InternalDeactivate();
            }
            catch (Exception e)
            {
                if (!ADP.IsCatchableExceptionType(e))
                {
                    throw;
                }

                // if an exception occurred, the inner connection will be
                // marked as unusable and destroyed upon returning to the
                // pool
                DoomThisConnection();
            }
        }
Exemple #2
0
        internal SqlCommand FindLiveCommand(TdsParserStateObject stateObj)
        {
            SqlCommand             command             = null;
            SqlReferenceCollection referenceCollection = (SqlReferenceCollection)ReferenceCollection;

            if (null != referenceCollection)
            {
                command = referenceCollection.FindLiveCommand(stateObj);
            }
            return(command);
        }
Exemple #3
0
        internal SqlDataReader FindLiveReader(SqlCommand command)
        {
            SqlDataReader          reader = null;
            SqlReferenceCollection referenceCollection = (SqlReferenceCollection)ReferenceCollection;

            if (null != referenceCollection)
            {
                reader = referenceCollection.FindLiveReader(command);
            }
            return(reader);
        }