I am trying to use a pyodbc connection in multiple threads. I am receieving the following error: Connection is busy with results for another command (0) (SQLExecDirectW)')
. I also tried setting MultipleActiveResultSets=yes;
and got the same results.
I really don't want to have to create a connection for every thread or query. I also don't want to use a lock to serialize queries from all threads.
I was first using the driver "SQL Server" and then moved to "SQL Server Native Client 11.0" with no luck.
Any suggestions?