MS Access passthrough query performs very slow when executing a stored procedure
I have passthrough query in my Access frontend that I use to import data from a sql server db. Before executing the passthrough query I pass the connectionstring and the sql to the querydef object and then I pass the output to a DAO recordset:
qdf.Connect = maconnectionstring
qdf.SQL = “EXEC MyStoredProc ” & param1 & “, ” param2
Set rstDAO = qdf.OpenRecordset
When I execute the stored procedure in SSMS using the same parameters it takes 2 seconds. In MS Access I need to set the ODBCTimeout parameter to 4 minutes to avoid a timeout error.
Any ideas how to improve the performance of the passthrough query?
I have passthrough query in my Access frontend that I use to import data from a sql server db. Before executing the passthrough query I pass the connectionstring and the sql to the querydef object and then I pass the output to a DAO recordset:qdf.Connect = maconnectionstring
qdf.SQL = “EXEC MyStoredProc ” & param1 & “, ” param2
Set rstDAO = qdf.OpenRecordset When I execute the stored procedure in SSMS using the same parameters it takes 2 seconds. In MS Access I need to set the ODBCTimeout parameter to 4 minutes to avoid a timeout error.Any ideas how to improve the performance of the passthrough query? Read More