![]() |
ado command timeout property
Hi there
When I retrieve an ADO recordset using a fairly long-running query from SQL Server (a minute or so to return results), I sometimes (unpredictably?) encounter a VBA timeout error. I have set the ADO connection object's timeout property to 0 ("infinite"). The recordset itself is created using the ADO command object, and I've set the command timeout value to 0 ("infinite"). The recordset object (understandably?) does not have a timeout property. I have experimented with different timeout values (up to 3000000) for both the command and connection objects, but it makes no difference. This makes it very difficult to run the procedure unattended. Perhaps the timeout arises on SQL Server's end? Or if, on the other hand, the error arises because the ADO "timeout" properties are not very effective, perhaps there is some way that I can trap the timeout error and attempt to requery the dataset when a timeout error occurs? Any help would be greatly appreciated. Best regards Loane |
All times are GMT +1. The time now is 07:29 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com