Forum Discussion
danevald
Oct 20, 2023Copper Contributor
ODBC from Access to SQL Server database - query timeout expired
I am having issues connecting to a database located on a SQL Server 2022. When creating the connection all test gives OK. But when trying to connect, it fails with: ODBC--call failed "Query tim...
danevald
Oct 24, 2023Copper Contributor
Found a solution now, the querytimeout had to be extended a lot...
I did not work to change the setting in Access, Options, Client settings, OLE/DDE timeout, I had to do it in registry:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\REGISTRY\MACHINE\Software\Microsoft\Office\16.0\Access Connectivity Engine\Engines\ODBC\QueryTimeout
I only have access to 1 table, but still it takes at least 1½-3 minutes to open the connection. I'm told because of the number of tables this might be as expected.
I did not work to change the setting in Access, Options, Client settings, OLE/DDE timeout, I had to do it in registry:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\REGISTRY\MACHINE\Software\Microsoft\Office\16.0\Access Connectivity Engine\Engines\ODBC\QueryTimeout
I only have access to 1 table, but still it takes at least 1½-3 minutes to open the connection. I'm told because of the number of tables this might be as expected.
Tom_van_Stiphout
Oct 24, 2023Steel Contributor
I have opened an Access FE with ODBC links to a few dozen tables among 4000 (!) tables in the on-prem SQL Server BE, and it was instantaneous.
The timeout can also be set on the QueryDef object, if you're running a PT query.
The timeout can also be set on the QueryDef object, if you're running a PT query.