Represents an open connection to a SQL Server Analysis Services database.
Наследование: System.Data.Common.DbConnection
Пример #1
0
        /// <summary>
        /// Initializes a new instance of the MdxDataAdapter class with the specified MdxCommand and MdxConnection.
        /// </summary>
        /// <param name="selectCommandText">The MDX statement to be used by the MdxDataAdapter.SelectCommand property.</param>
        /// <param name="selectConnection">An MdxConnection representing the connection.</param>
        public MdxDataAdapter(string selectCommandText, MdxConnection selectConnection)
        {
            MdxCommand command = new MdxCommand(selectCommandText);

            command.Connection = selectConnection;
            SelectCommand      = command;
        }
Пример #2
0
        internal MdxTransaction(MdxConnection connection)
        {
            if (null == connection)
                throw new ArgumentNullException("connection");

            _connection = connection;
        }
Пример #3
0
        /// <summary>
        /// Initializes a new instance of the MdxCommand class with the text of the query and a MdxConnection.
        /// </summary>
        /// <param name="commandText">The text of the query.</param>
        /// <param name="connection">An MdxConnection representing the connection to SQL Server Analysis Services.</param>
        public MdxCommand(string commandText, MdxConnection connection)
        {
            if (null == connection)
                throw new ArgumentNullException("connection");

            _command = new AdomdCommand(commandText, connection.Connection);
            _connection = connection;
        }
Пример #4
0
        internal MdxTransaction(MdxConnection connection)
        {
            if (null == connection)
            {
                throw new ArgumentNullException("connection");
            }

            _connection = connection;
        }
Пример #5
0
        /// <summary>
        /// Initializes a new instance of the MdxCommand class with the text of the query and a MdxConnection.
        /// </summary>
        /// <param name="commandText">The text of the query.</param>
        /// <param name="connection">An MdxConnection representing the connection to SQL Server Analysis Services.</param>
        public MdxCommand(string commandText, MdxConnection connection)
        {
            if (null == connection)
            {
                throw new ArgumentNullException("connection");
            }

            _command    = new AdomdCommand(commandText, connection.Connection);
            _connection = connection;
        }
Пример #6
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (null != _connection)
         {
             Rollback();
         }
         _connection = null;
     }
     base.Dispose(disposing);
 }
Пример #7
0
 internal MdxDataReader(ResultSet resultSet, MdxConnection connection)
 {
     _resultSet   = resultSet;
     _connection  = connection;
     _schemaTable = CreateSchemaTable();
 }
Пример #8
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (null != _connection)
         {
             Rollback();
         }
         _connection = null;
     }
     base.Dispose(disposing);
 }
Пример #9
0
 /// <summary>
 /// Initializes a new instance of the MdxDataAdapter class with the specified MdxCommand and MdxConnection.
 /// </summary>
 /// <param name="selectCommandText">The MDX statement to be used by the MdxDataAdapter.SelectCommand property.</param>
 /// <param name="selectConnection">An MdxConnection representing the connection.</param>
 public MdxDataAdapter(string selectCommandText, MdxConnection selectConnection)
 {
     MdxCommand command = new MdxCommand(selectCommandText);
     command.Connection = selectConnection;
     SelectCommand = command;
 }