internal void Release()
        {
            RollbackImplicitTransaction();

            DisposeReader();

            if (_connection != null && _connection.State == ConnectionState.Open)
            {
                _connection.InnerConnection.RemovePreparedCommand(this);
            }

            if (_statement != null)
            {
                _statement.Dispose();
                _statement = null;
            }
        }
예제 #2
0
        internal void Release()
        {
            // Rollback implicit transaction
            RollbackImplicitTransaction();

            // If there	are	an active reader close it
            DisposeReader();

            // Remove the command from the Prepared commands list
            if (_connection != null && _connection.State == ConnectionState.Open)
            {
                _connection.InnerConnection.RemovePreparedCommand(this);
            }

            // Dipose the inner statement
            if (_statement != null)
            {
                _statement.Dispose();
                _statement = null;
            }
        }