C
Chris Magoun
I have an application that connects an OWC Pivottable to an Analysis Server
cube. During one of the final steps in formatting the pivot table, I am
getting this error:
Description: Microsoft® OLE DB Provider for Analysis Services
-2147467259
Cannot load databases; version may not be valid.
I feel this is strange since at this point in the code, the app has
performed many other operations. Also, I can run this user's report on my
own machine, as well as many other machines. The routine that is throwing
the error is below:
Private Sub ApplySort(ByVal elem As IXMLDOMNode)
On Error GoTo errHandler
WriteLogEntry "Applying Sort START"
'What do we sort on and in what order?
Dim sSortOn As String
Dim sSortOrder As String
sSortOn = elem.selectSingleNode("SortColumn").Text
sSortOrder = elem.selectSingleNode("SortOrder").Text
If sSortOn <> "" Then
'A sort is required
Dim iSort As Integer
If sSortOrder = LIST_ASC Then
iSort = PIVOT_SORTASC
Else
iSort = PIVOT_SORTDESC
End If
'Go through each field in each fieldset and sort
Dim fldSet As Object
Dim fld As Object
For Each fldSet In m_av.rowaxis.fieldSets
For Each fld In fldSet.Fields
fld.sortdirection = iSort
'Either sort on a total, or the name (sortOn = nothing)
If sSortOn <> LIST_SUBTBL Then Set fld.sorton =
m_av.Totals(sSortOn) <<< I believe this line is the failure point.
Next
Next
End If
WriteLogEntry "Applying Sort END"
Exit Sub
errHandler:
ReportError "ApplySort", "", Err.Source & vbCrLf & Err.Number & vbCrLf &
Err.Description
Err.Clear
End Sub
Has anyone seen this error before? Can you point me to possible resources,
or solutions?
Thanks,
Chris Magoun
cube. During one of the final steps in formatting the pivot table, I am
getting this error:
Description: Microsoft® OLE DB Provider for Analysis Services
-2147467259
Cannot load databases; version may not be valid.
I feel this is strange since at this point in the code, the app has
performed many other operations. Also, I can run this user's report on my
own machine, as well as many other machines. The routine that is throwing
the error is below:
Private Sub ApplySort(ByVal elem As IXMLDOMNode)
On Error GoTo errHandler
WriteLogEntry "Applying Sort START"
'What do we sort on and in what order?
Dim sSortOn As String
Dim sSortOrder As String
sSortOn = elem.selectSingleNode("SortColumn").Text
sSortOrder = elem.selectSingleNode("SortOrder").Text
If sSortOn <> "" Then
'A sort is required
Dim iSort As Integer
If sSortOrder = LIST_ASC Then
iSort = PIVOT_SORTASC
Else
iSort = PIVOT_SORTDESC
End If
'Go through each field in each fieldset and sort
Dim fldSet As Object
Dim fld As Object
For Each fldSet In m_av.rowaxis.fieldSets
For Each fld In fldSet.Fields
fld.sortdirection = iSort
'Either sort on a total, or the name (sortOn = nothing)
If sSortOn <> LIST_SUBTBL Then Set fld.sorton =
m_av.Totals(sSortOn) <<< I believe this line is the failure point.
Next
Next
End If
WriteLogEntry "Applying Sort END"
Exit Sub
errHandler:
ReportError "ApplySort", "", Err.Source & vbCrLf & Err.Number & vbCrLf &
Err.Description
Err.Clear
End Sub
Has anyone seen this error before? Can you point me to possible resources,
or solutions?
Thanks,
Chris Magoun