ADO: Excel VBA timeout error
- From: "Loane Sharp" <look_sharp_not@xxxxxxxxxxx>
- Date: Sun, 16 Oct 2005 20:09:46 +0200
Hi there
I'm using ADO 2.8 in Excel VBA 2003. 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
.
- Follow-Ups:
- Re: ADO: Excel VBA timeout error
- From: noelpv@xxxxxxxxxxx
- Re: ADO: Excel VBA timeout error
- Prev by Date: Store procedure
- Next by Date: Re: Discussing 3 different strategies for deleting from multiple tables
- Previous by thread: Store procedure
- Next by thread: Re: ADO: Excel VBA timeout error
- Index(es):
Relevant Pages
|
|