Represents an open connection to a SQL Server Analysis Services database.
Inheritance: 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;
 }