title: Can't connect through PHP to an Access Database
body: <p>I have to establish a connection via PHP to a Access Database, but everytime I try I get this error:</p>
  
  <blockquote>
    <p>Fatal error: Uncaught exception 'com_exception'</p>
  </blockquote>
  
  <p>With message:</p>
  
  <blockquote>
    <p>'<b>Source:</b> Microsoft OLE DB<br>
    Service Components<br/><b>Description:</b> Das Format der Initialisierungszeichenfolge entspricht nicht 
        den OLE DB-Angaben.' in E:\path\to\phpfile.php:93<br>
    Stack trace:  #0  E:\path\to\phpfile.php(93): com->Open('DRIVER={Microso...') #1 {main} thrown in</p>
  </blockquote>
  
  <p>The German text means something like "the format of the initialization string is not common of the OLE DB statements.</p>
  
  <p>My connection code looks like</p>
  
  <pre><code>$db = 'DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" &amp; Server.MapPath("\") &amp; ("\\db\\db.mdb") &amp; ";"';
  $conn = new COM("ADODB.Connection"); 
  $conn-&gt;Open($db);
  </code></pre>
  
  <p>I can't figure out what's wrong. In pure ASP it works fine, but not in PHP.</p>
  
  <p>Thanks in advance</p>