PDA

View Full Version : Solved: OLAP Cube issue with Excel 2010



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"

Bob Phillips
08-10-2011, 05:45 AM
Can you post the files so that we can play with it?

slang
08-10-2011, 08:55 AM
Cool, Tracked the problem down to the new tablets not having the 2003 web services installed which it needs.
Thanks Xld.

Bob Phillips
08-10-2011, 09:12 AM
Cool, Tracked the problem down to the new tablets not having the 2003 web services installed which it needs.
Thanks Xld.

Blimey, I'm good. I solved it without doing anything :tongue2:

slang
08-10-2011, 09:20 AM
It was just seeing your response that gave me the confidence to look deeper:bow:
:giggle

Aussiebear
08-11-2011, 03:57 AM
Bob if only you could realise your potential