pyodbc.connect timeout argument is ignored for calls to SQL Server

后端 未结 2 582
南方客
南方客 2021-01-04 12:55

I am using pyodbc on Linux with FreeTDS to connect to SQL Server 2005. I have noticed that the timeout argument to my connection is not being honoured by my queries.

2条回答
  •  耶瑟儿~
    2021-01-04 13:13

    Refer pyodbc connection, there are two separate timeout parameters, a variable on the Connection class (this sets the timeout for queries) and a keyword param to pyodbc.connect (and this one for the actual connection process). Based on this you are setting the timeout for the connection process in your code and not for queries.

提交回复
热议问题