Sets a connection string to a cube in an MS Analysis Services database, and loads data from the cube asynchronously.
public Task<bool> SetOlapConnectionStringAsync( string olapConnectionString )
Public Function SetOlapConnectionStringAsync( olapConnectionString As String ) As Task(Of Boolean)
A String that specifies the connection string to an OLAP cube.
An asynchronous operation that returns true in case of success.
The SetOlapConnectionStringAsync method is asynchronous. It starts executing the related operation in a background thread, and immediately returns control. The primary UI thread is not blocked, allowing the application to continue responding to end-user actions. For more information about the asynchronous mode, see Asynchronous Mode.
If you need to perform specific actions after this operation is completed, use another overload of the SetOlapConnectionStringAsync method that takes the asyncCompleted parameter, and pass a delegate that performs the required actions as this parameter.
To load data from an OLAP cube synchronously, use the PivotGridControl.OlapConnectionString property to specify a connection string.
A sample connection string is shown below:
OLAPConnectionString=”Provider=msolap;Data Source=localhost;Initial Catalog=Adventure Works DW;Cube Name=Adventure Works;Query Timeout=100;”
The connection string has the following parameters:
- Provider - Identifies a data provider to be used. The “msolap” string identifies the latest version of Microsoft SQL Server Analysis Services (SSAS);
- Data Source - Specifies the name of a server that runs an instance of SSAS;
- Initial Catalog - Specifies a data catalog that contains cubes;
- Cube Name - Specifies the name of a cube that provides OLAP data;
- Query Timeout (optional) - The maximum amount of time, in seconds, to wait for a query to SSAS to complete. If the parameter is set to 0, each query can last for an indefinite time.