Can I use multiple cursors on one connection with pyodbc and MS SQL Server? Can I use multiple cursors on one connection with pyodbc and MS SQL Server? python python

Can I use multiple cursors on one connection with pyodbc and MS SQL Server?


According to this guy

Cursor objects are used to execute SQL statements. ODBC and pyodbc allow multiple cursors per connection, but not all databases support this.

and you can determine concurrent cursors can be supported with:

import pyodbcconnection = pyodbc.connect(...)how_many = connection.getinfo(pyodbc.SQL_MAX_CONCURRENT_ACTIVITIES)print(how_many)


I my own practice I have never met necessity to use more than one database cursor. Such problems are used to be solved by sophisticated SQL queries (joins, groups). Or (if you can to ignore perfomance issues) by using several simple queries.