slang
08-10-2011, 05:05 AM
Hello Excel gods.
We have an app that uses an offline OLAP data source that works fine in Office 2003 but in Office 2010 I get the following error.
GetPVTConnection Error(80004005) file system error, C:\bdr points to an existing file that can not be opened.
I really dont know where to start with this one but here is some of the code that is having the issue.
Public Function GetPvtConnection() As ADODB.Connection
Dim con As ADODB.Connection
On Error GoTo GPErr:
Set con = New ADODB.Connection
With wksPivot.PivotTables("pvtMain").PivotCache
If .UseLocalConnection = True Then
con.ConnectionString = Right(.LocalConnection, Len(.LocalConnection) - 6) ' local connection string (without leading OLEDB;)
Else
con.ConnectionString = Right(.Connection, Len(.Connection) - 6) ' online connection string (without leading OLEDB;)
End If
End With
con.Open ' open ADO connection
Set GetPvtConnection = con ' return new connection
Set con = Nothing ' free this reference
Exit Function
GPErr:
If Err.Number < 0 Then
MsgBox "GetPvtConnection Error (" & Hex$(Err.Number) & "): " & vbCr & Err.Description, vbExclamation + vbOKOnly, TITLE
Else
MsgBox "GetPvtConnection Error (" & Trim$(Str$(Err.Number)) & "): " & vbCr & Err.Description, vbExclamation + vbOKOnly, TITLE
End If
End Function
Seems like it just will not make a connection to the local cub file. I know that OLAP support is included with 2010 but are there other changes that could be throwing a wrench into this?
If someone could just point me in the right directon that would be simply great.:banghead:
Quick update, When the "con.Open" comand is thrown the value seems ok as it is"Provider=MSOLAP.2;Persist Security Info=True;Data Source=c:\bdr\alc1.cub;Initial Catalog=ALC1;Client Cache Size=25;Auto Synch Period=10000"
We have an app that uses an offline OLAP data source that works fine in Office 2003 but in Office 2010 I get the following error.
GetPVTConnection Error(80004005) file system error, C:\bdr points to an existing file that can not be opened.
I really dont know where to start with this one but here is some of the code that is having the issue.
Public Function GetPvtConnection() As ADODB.Connection
Dim con As ADODB.Connection
On Error GoTo GPErr:
Set con = New ADODB.Connection
With wksPivot.PivotTables("pvtMain").PivotCache
If .UseLocalConnection = True Then
con.ConnectionString = Right(.LocalConnection, Len(.LocalConnection) - 6) ' local connection string (without leading OLEDB;)
Else
con.ConnectionString = Right(.Connection, Len(.Connection) - 6) ' online connection string (without leading OLEDB;)
End If
End With
con.Open ' open ADO connection
Set GetPvtConnection = con ' return new connection
Set con = Nothing ' free this reference
Exit Function
GPErr:
If Err.Number < 0 Then
MsgBox "GetPvtConnection Error (" & Hex$(Err.Number) & "): " & vbCr & Err.Description, vbExclamation + vbOKOnly, TITLE
Else
MsgBox "GetPvtConnection Error (" & Trim$(Str$(Err.Number)) & "): " & vbCr & Err.Description, vbExclamation + vbOKOnly, TITLE
End If
End Function
Seems like it just will not make a connection to the local cub file. I know that OLAP support is included with 2010 but are there other changes that could be throwing a wrench into this?
If someone could just point me in the right directon that would be simply great.:banghead:
Quick update, When the "con.Open" comand is thrown the value seems ok as it is"Provider=MSOLAP.2;Persist Security Info=True;Data Source=c:\bdr\alc1.cub;Initial Catalog=ALC1;Client Cache Size=25;Auto Synch Period=10000"