title: Connecting to SQL Server using odbc mssql with Adodb5 on Linux / Mac
body: <p>I cannot connect to a SQL server database from my Mac. Here's my PHP code:</p>
  
  <pre><code>$db = &amp;ADONewConnection('odbc_mssql');
  $db-&gt;debug = true;
  $myDSN="DRIVER={SQL Server Native Client 10.0};SERVER=XXX.XXX.XXX.XX;PORT=1433;UID=XXXX;PWD=XXXXX;DATABASE=XXXXX;";
      $db-&gt;Connect($myDSN);
  </code></pre>
  
  <p>I've tried a whole bunch of different drivers (FreeTDS, SQL SERVER, SQL Server Native Client etc.) but I keep getting this error:</p>
  
  <pre><code>SQL error: [unixODBC][Driver Manager]Data source name not found, and no default driver specified, SQL state IM002
  </code></pre>
  
  <p>FYI, I've installed php5-mssql, freetds and unixODBC.</p>
  
  <p>Thanks in advance for your help.</p>