Nov-19-2019, 02:50 PM
(This post was last modified: Nov-20-2019, 10:31 PM by SnoopFrogg.)
I think the issue is in your connection string in line 1 of your code. I'm assuming that the results of the first query results are open against the same connections as your second query. SQL added a multiple active result sets (MARS) feature to allow you to create multiple cursors using a single connection. Try something like:
sqlverbinding = pyodbc.connect( "Driver={SQL Server};Server=192.168.1.17;Database=Test;Trustedconnection=yes;MARS_Connection=yes;" )Hopefully that helps.