P
patrick
hello
i want to change the commandtext in pivotcaches
i've an odbc connection, then i create e pivot cache and a pivot table:
With ActiveWorkbook.PivotCaches.Add(xlExternal)
.Connection = _
"ODBC;DSN=test;UID=test;PWD=test"
.CommandText = (sql-statement)
.CreatePivotTable Range("A3"), "Pivot Table"
End With
then in step 2 i want to change the sql statement (p.e. with new date
selection):
With ActiveWorkbook.PivotCaches.Add(xlExternal)
.CommandText = (sql-statement 2)
End With
ActiveSheet.PivotTables("Pivot Tabelle").PivotCache.Refresh
but the cache wasn't refresh on the pivot table. the pivot table looks
with the old date too.
i also try:
set pvtCache = ActiveWorkbook.PivotCaches.Add(xlExternal)
but i work doesn't too.
can anyone help me, please?
i want to change the commandtext in pivotcaches
i've an odbc connection, then i create e pivot cache and a pivot table:
With ActiveWorkbook.PivotCaches.Add(xlExternal)
.Connection = _
"ODBC;DSN=test;UID=test;PWD=test"
.CommandText = (sql-statement)
.CreatePivotTable Range("A3"), "Pivot Table"
End With
then in step 2 i want to change the sql statement (p.e. with new date
selection):
With ActiveWorkbook.PivotCaches.Add(xlExternal)
.CommandText = (sql-statement 2)
End With
ActiveSheet.PivotTables("Pivot Tabelle").PivotCache.Refresh
but the cache wasn't refresh on the pivot table. the pivot table looks
with the old date too.
i also try:
set pvtCache = ActiveWorkbook.PivotCaches.Add(xlExternal)
but i work doesn't too.
can anyone help me, please?