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.
This post was by Robert Fischer, written on May 7, 2010.
Comment on this post: http://enfranchisedmind.com/blog/posts/msquery-error-pivotcache/#respond
Public Permalink: http://enfranchisedmind.com/blog/posts/msquery-error-pivotcache/

This article was a post on the EnfranchisedMind blog. EnfranchisedMind Blog by Robert Fischer, Brian Hurt, and Other Authors is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.
