title: Unable to connect to MSSQL from Python
body: <p>my Python code:</p>
  
  <pre><code>import pyodbc
  cnxn = pyodbc.connect('DRIVER=FreeTDS;DSN=S29;UID=test;PWD=test;TDS_Version=8.0;ClientCharset=UTF8')
  cursor = cnxn.cursor()
  cursor.execute("select user_id, user_name from users")
  rows = cursor.fetchall()
  for row in rows:
    print row.user_id, row.user_name
  </code></pre>
  
  <p>Get error:</p>
  
  <pre><code>Traceback (most recent call last):
  File ".../test_mssql_connect.py", line 4, in &lt;module&gt;
  cnxn = pyodbc.connect('DRIVER=FreeTDS;DSN=S29;UID=test;PWD=test;TDS_Version=8.0;ClientCharset=UTF8')
  pyodbc.Error: ('HY000', '[]  (20013) (SQLDriverConnect)')
  </code></pre>
  
  <p>I can not find the information, what is this error <strong>('HY000', '[]  (20013) (SQLDriverConnect)')</strong> and how to fix it.</p>
  
  <p>At the same time through <strong>tsql</strong>, <strong>osql</strong> and <strong>isql</strong> I successfully connected to the base</p>
  
  <p>my <strong>odbc.ini</strong> </p>
  
  <pre><code>[S29]
  Driver=FreeTDS
  Description=S29
  ServerName=192.168.0.29
  Database=test
  UID=test
  PWD=test
  TDS_Version=8.0
  </code></pre>
  
  <p>my <strong>odbcinst.ini</strong></p>
  
  <pre><code>[FreeTDS]
  Description=FreeTDS
  Driver=/usr/local/Cellar/freetds/0.95.1/lib/libtdsodbc.so
  Setup=/usr/local/Cellar/freetds/0.95.1/lib/libtdsodbc.so
  UsageCount=2
  CPTimeout =
  CPReuse =
  TDS Version = 8.0
  client charset = utf-8
  </code></pre>
  
  <p>my <strong>freetds.conf</strong></p>
  
  <pre><code>[global]
  tds version = 8.0
  [192.168.0.29]
  host = 192.168.0.29
  port = 1433
  tds version = 8.0
  [S29]
  host = 192.168.0.29
  port = 1433
  tds version = 8.0
  </code></pre>