I am getting the error :"('24000', '[24000] [FreeTDS][SQL Server]Invalid cursor state (0) (SQLExecDirectW)')" when running pyodbc query using freetds driver.
I have been through multiple articles looking for solutions and most of them indicate that there is an open cursor and it has to be closed before using the cursor again.
I do not have this situation in my code as I am making one single call. The issue is around the size of the data that is returned from the query execution. The length of the string returned is around 32K and this causes the issue. If the large record is excluded, there is no issue during execution.
Steps tried but no help : - FreeTDS conf was altered to change text size - changed the version of FreeTDS