The connection can't be used or an error
occurred.
Parameters
m_cnConnection
An ADODB.Connection that the control will use.
errString
Returns the error string if one occurred.
Examples
Dim cn As New ADODB.Connection
Dim errString As String
Call cn.Open("Provider=MSOLAP;Data Source=C:\Dev\OlapX\SEV.cub;Client Cache Size=25;Auto Synch Period=10000")
With OlapXApp1
.OpenFile = "C:\OLAP_CUBES_DIR\SEV.cub"
.OpenServer = ""
Call .setConnection(cn, errString)
If errString <> "" Then
Call MsgBox(errString)
End If
End With
Explanation
Shares a connection between a local cube file and a host application.
Examples
Dim cn As New ADODB.Connection
Dim errString As String
Call cn.Open("Provider=MSOLAP.2;Data Source=localhost;Client Cache Size=25;Auto Synch Period=10000;Initial Catalog=FoodMart 2000")
With OlapXApp1
.OpenServer = "localhost"
.OpenDB = "FoodMart 2000"
.OpenCube = "Sales"
Call .setConnection(cn, errString)
If errString <> "" Then
Call MsgBox(errString)
End If
End With
Explanation
Shares a connection to MS Analysis Services between the control and a host application.
Open a cube file or cube view located on a web server
Notes
If there is a connection already, the current connection is closed and opened with the new connection specified here.
Use the Open... properties to specified which cube the control will connect. For MS Analysis Services, you must specify an Initial catalog to connect to a database.