title: pyodbc connection error when trying to connect to DB on localhost
body: <p>I have a local DB on my machine called 'Test' which contains a table called 'Tags'. I am able to access this DB and query from this table through SQL Server management studio 2008.</p>
  
  <p>However, when using pyodbc I keep running into problems.</p>
  
  <p>Using this:</p>
  
  <pre><code>conn = pyodbc.connect('DRIVER={SQL Server};SERVER=localhost:1433;DATABASE=Test')
  </code></pre>
  
  <p>yields the error:</p>
  
  <pre><code>pyodbc.Error: ('08001', '[08001] [Microsoft][ODBC SQL Server Driver][DBNETLIB]Invalid connection. (14) (SQLDriverConnectW); [01000] [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Invalid Instance()). (14)')
  </code></pre>
  
  <p>(with or without specifying the port)</p>
  
  <p>Trying an alternative connection string:</p>
  
  <pre><code>conn = pyodbc.connect('DRIVER={SQL Server};SERVER=localhost\Test,1433')
  </code></pre>
  
  <p>yields no error, but then:</p>
  
  <pre><code>cur = conn.cursor()
  cur.execute("SELECT * FROM Tags")
  </code></pre>
  
  <p>yields the error:</p>
  
  <pre><code>pyodbc.ProgrammingError: ('42S02', "[42S02] [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'Tags'. (208) (SQLExecDirectW)")
  </code></pre>
  
  <p>Why could this be?</p>