If you’re working in MS Excel 2007 and you’re programmatically updating PivotCaches, but you get an error about “Cannot run ‘MSQUERY.EXE’.” despite the fact that MS Query seems to be running just fine all the other times, your problem may well be because of the asynchronous updates: if two pivot caches attempt to use MS Query at the same time, the second one explodes with this error. The solution is to set pvtCache.BackgroundQuery to false, which makes the cache refresh synchronous.
Related posts:
