title: Building a local cube
body: <p>I need to build a local .cub file for my Excel-using clients.</p>
  
  <p>I have scrounged together some VB code but it fails :</p>
  
  <pre><code>ConnLocation = "LOCATION=C:\test.cub;"
  ConnDSN = "SOURCE_DSN=DSN=TEST;UID=test;PWD=pass;"
  ConnCreateCube = _
  "CREATECUBE=CREATE CUBE [TestCube] (" &amp; _
  "DIMENSION [account_code]);"
  Connection = CreateObject("ADODB.Connection")
  Connection.Provider = "msolap"
  Connection.ConnectionString = _
      ConnLocation &amp; _
     ConnDSN &amp; _
  ConnCreateCube
  </code></pre>
  
  <p>I have trimmed this down to the above code and am getting a mysterious <code>OLE DB error: OLE DB or ODBC error.</code>" when I try to run it.</p>
  
  <p>Any help on the above or suggestions on a different way to approach this would me much appreciated.</p>