title: Connecting to SQL Server with pypyodbc
body: <p>I need to send unicode to SQL Server with Python 2.7.  I <a href="https://stackoverflow.com/questions/16024041/unable-to-send-unicode-cleanly-to-sql-server-using-pymssql">failed with pymssql</a>.  I'm now trying to get <code>pypyodbc</code> working (as opposed to <code>pyodbc</code>), as it gives <a href="https://code.google.com/p/pypyodbc/wiki/A_HelloWorld_sample_to_access_mssql_with_python" rel="nofollow noreferrer">working unicode examples</a>.  The problem is that the connection string in the example doesn't look like anything I recognize.  I looked at <a href="https://github.com/jiangwen365/pypyodbc/blob/master/sqlservertests.py" rel="nofollow noreferrer">this</a>, and, after a little trial and error, constructed this string:</p>
  
  <pre><code>conn = pypyodbc.connect("DRIVER={SQL Server};SERVER='MyServer';UID='me';PWD='MyPassword';DATABASE='db'")
  </code></pre>
  
  <p>Got back a <code>DatabaseError</code> focused on the connection string:</p>
  
  <pre><code>C:\Anaconda\lib\site-packages\pypyodbc.pyc in __init__(self, connectString, autocommit, ansi, timeout, unicode_results, readonly, **kargs)
  ---&gt; 2 conn = pypyodbc.connect("DRIVER={SQL Server};SERVER='MyServer';UID='me';PWD='password';DATABASE='db'")
  
  C:\Anaconda\lib\site-packages\pypyodbc.pyc in __init__(self, connectString, autocommit, ansi, timeout, unicode_results, readonly, **kargs)
  ---&gt; 2273         self.connect(connectString, autocommit, ansi, timeout, unicode_results, readonly)
  
  C:\Anaconda\lib\site-packages\pypyodbc.pyc in connect(self, connectString, autocommit, ansi, timeout, unicode_results, readonly)
  ---&gt; 2321         check_success(self, ret)
  
  C:\Anaconda\lib\site-packages\pypyodbc.pyc in ctrl_err(ht, h, val_ret, ansi)
  ---&gt; 919                 raise DatabaseError(state,err_text)
  
  DatabaseError: (u'08001', u'[08001] [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied.')
  </code></pre>
  
  <p>I know my credentials are correct because I've used them to connect successfully using pymssql.  What am I missing?</p>