title: PYODBC Fetchmany to csv only outputting header
body: <p>I'm trying to write a large table to a <code>csv</code> using <code>pyodbc</code> using <code>fetchmany()</code>.  I can connect correctly, but the only record which gets written is the header.  What's the correct way to loop over a db cursor? </p>
  
  <pre><code>cxn = pyodbc.connect(cxn data)
  
  mssql_cursor = cxn.cursor()
  mssql_cursor.execute(sql_query)
  
  c = csv.writer(open('file.csv', 'w', encoding ='UTF-8', newline='\n'), delimiter='|')
  c.writerow([i[0] for i in mssql_cursor.description])
  results = mssql_cursor.fetchmany(10000)
  while results:
      c.writerows(results)
      results = mssql_cursor.fetchmany(10000)
  
  mssql_cursor.close()
  cxn.close()
  </code></pre>
  
  <p>Edit:  It looks that there is nothing being returned via the <code>fetchmany</code> method.  I added <code>print(len(results))</code> and the result was 0.  </p>