title: If I use a context manager with a pyodbc cursor, will it rollback on an error?
body: <p>I tried reading the pyodbc source, but it is all C++ code (I'm not competent in C++). I need to know the behavior of a statement like:</p>
  
  <pre><code> with connection.cursor() as cursor:
       cursor.execute(query_1) #inserts some stuff into table A
       cursor.execute(query_2) #inserts some stuff into table B, but throws an error
  
   with connection.cursor() as cursor2:
       cursor.execute(select_query_1) #selects from table A
       cursor.execute(select_query_2) #selects from table B
  </code></pre>
  
  <p>This is in the same connection where we haven't commited yet - I am curious about whether selecting from table A will give the new values inserted in the first cursor - or whether the error in query_2 causes the work of the first cursor to be rolled back for table A.</p>