MSQuery Error When Refreshing the Pivot Cache - No Fluff Just Stuff

MSQuery Error When Refreshing the Pivot Cache

Posted by: Robert Fischer on May 7, 2010

Cannot run 'MSQUERY.EXE'. The program or one of its components is damaged or missing.

Run-time error '1004'.

Sharing for the sake of desperate googlers struggling with this problem…

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/
Creative Commons License
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.

(Digital Fingerprint: bcecb67d74ab248f06f068724220e340 (69.147.112.168) )

Robert Fischer

About Robert Fischer

Robert Fischer is a multi-language open source developer currently specializing in Groovy in Grails. In the past, his specialties have been in Perl, Java, Ruby, and OCaml. In the future, his specialty will probably be F# or (preferably) a functional JVM language like Scala or Clojure.

Robert is the author of Grails Persistence in GORM and GSQL, a regular contributor to GroovyMag and JSMag, the founder of the JConch Java concurrency library, and the author/maintainer of Liquibase-DSL and the Autobase database migration plugin for Grails.

Why Attend the NFJS Tour?

  • » Cutting-Edge Technologies
  • » Agile Practices
  • » Peer Exchange

Current Topics:

  • Languages on the JVM: Scala, Groovy, Clojure
  • Enterprise Java
  • Core Java, Java 8
  • Agility
  • Testing: Geb, Spock, Easyb
  • REST
  • NoSQL: MongoDB, Cassandra
  • Hadoop
  • Spring 4
  • Cloud
  • Automation Tools: Gradle, Git, Jenkins, Sonar
  • HTML5, CSS3, AngularJS, jQuery, Usability
  • Mobile Apps - iPhone and Android
  • More...
Learn More »