title: "Data source name not found and no default driver specified" when connecting to Teradata with pyodbc on Windows
body: <p>I am trying to connect to a Teradata database using the following python snippet:</p>
  
  <pre><code>con = pyodbc.connect("Provider = Teradata; DBCNAME = teradata-dev,
        database = mydatabase UID = myuserid, PWD = mypassword")
  </code></pre>
  
  <p>Database, UID, and PWD hold non-dummy values. The data source is defined in "32-bit ODBC administrator"</p>
  
  <p>I get the following error message: </p>
  
  <pre><code>pyodbc.Error: ('IM002', '[IM002] [Microsoft][ODBC Driver Manager] Data 
  source name not found and no default driver specified (0) (SQLDriverConnect)')
  </code></pre>
  
  <p>I have no problem connecting using R's RODBC packge. What am I doing wrong?</p>
  
  <p>OS: Windows 7 professional 64 bit </p>
  
  <p>Teradata Driver: 32 bit, version 14.10.00.00</p>
  
  <p>Python: 32 bit, Python 2.7.10 | Anaconda 2.3.0</p>
  
  <p>UPDATE:</p>
  
  <p>I've tried a different connection string:</p>
  
  <pre><code>"sConn=ODBC;Driver={Teradata};DSN=teradata-dev;database=mydatabase;
  UID=myusername;PWD=mypassword"
  </code></pre>
  
  <p>and now I get the following error:</p>
  
  <pre><code>pyodbc.Error: ('28000', '[28000] [Teradata][ODBC Teradata Driver] Not 
  enough information to log on (0) (SQLDriverConnect); [28000] 
  [Teradata][ODBC Teradata Driver] Not enough information to log on (0)')
  </code></pre>
  
  <p>UPDATE #2:</p>
  
  <p>I got it to work correctly by using the DSN directly. </p>
  
  <p>"DSN = dsninODBC;USN = myusername;PWD = mypassword"</p>