I am writing some python to interact with a MSSQL server that I have access to. The issue I am currently having is that one of my transact statements is not getting past the timeout period that is set by default (30 seconds).
I have tried to change the Command Timeout in the connections string to have a value of 0 so that this will not be an issue, but am being told that the Command Timeout keyword is not supported.
Here is my Connection String:
conn_string='data source=localhost;initial_catalog=research;trusted_connection=True;Connection Timeout=0;Command Timeout=0'
Here is the console message I get when using this connection string:
Value Error: Keyword not supported: 'command timeout'
I have tried command timeout with the space, without the space, and with/without capital letters depending on whichever support thread I was currently reading while trying to resolve this issue.
Does anyone here know of a way to set the timeout value to be longer than 30 seconds when changing the Command Timeout in the connection string does not seem to be working?
You specify a command timeout on the connection or command object itself, not in the connection string. Check out this resource for ADO connection objects.