title: python and pymssql
body: <p>I'm new to python.  I'm trying to query a MSSQL database.</p>
  
  <hr>
  
  <pre><code>import pymssql
  conn = pymssql.connect(host='hostname', user='username', password='password', database='dbname')
  cursor = conn.cursor()
  sql = "select count(*) from T_Email with (nolock) where Transmit is null"
  cursor.execute(sql)
  results = cursor.fetchall()
  for row in results:
    print (row)
  </code></pre>
  
  <hr>
  
  <p>The query successfully runs is Microsoft SQL Server Management Studio, but my python script always returns nothing.</p>
  
  <p>I verified I have network connectivity.  I verified the username, password and database name.  If I change the password, then the script will give an error.  </p>
  
  <p>I have tried results = cursor.fetchone(), but that didn't help.</p>
  
  <p>Any suggestions?</p>