title: Accessing Secure Access Databases with CodeIgniter
body: <p>If I want to connect to a secure Access DB (ie through an MDW file) via CodeIgniter, what are the settings I need here:</p>
  
  <pre><code>$db['test']['hostname'] = '';
  $db['test']['username'] = '';
  $db['test']['password'] = '';
  $db['test']['database'] = '';
  $db['test']['dbdriver'] = 'odbc';
  $db['test']['dbprefix'] = '';
  $db['test']['pconnect'] = FALSE;
  $db['test']['db_debug'] = TRUE;
  $db['test']['cache_on'] = FALSE;
  $db['test']['cachedir'] = '';
  $db['test']['char_set'] = 'utf8';
  $db['test']['dbcollat'] = 'utf8_general_ci';
  $db['test']['swap_pre'] = '';
  $db['test']['autoinit'] = TRUE;
  $db['test']['stricton'] = FALSE;
  </code></pre>
  
  <p>I assume the connection string should be something like this:</p>
  
  <pre><code>Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\mydatabase.mdb;Jet OLEDB:System Database=system.mdw;User ID=myUsername;Password=myPassword;
  </code></pre>
  
  <p>Although I'm quite happy to be corrected on that :)</p>
  
  <h2>Edit</h2>
  
  <p>In light of a couple of answers, I'll clarify something. I want to access an MS Access file through a workgroup. Essentially what I'm after is this - assuming that connection string is correct, which I think it is - which bits of it go where? I had assumed this:</p>
  
  <pre><code>$db['test']['hostname'] = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\mydatabase.mdb;Jet OLEDB:System Database=system.mdw";
  </code></pre>
  
  <p>But does the username and password need to go in that string, since they'll be used in system.mdw, or in the ['username'] and ['password'] keys respectively? Or have I got the wrong end of the stick and put something where it shouldn't be? Cos it don't connect...</p>