Re: Waiting for a recordset to finish fetching
- From: "Stephen Howe" <stephenPOINThoweATtns-globalPOINTcom>
- Date: Thu, 26 Jul 2007 17:28:24 +0100
First this "Waiting for a recordset to finish fetching" is only true if you
have opened the Recordset as asynchronous. If you have not, the Fetching
does not apply.
Asynchronous applies to client-sided curosrs
If you open a Recordset, client-sided and you have not specified
asynchronous, then the Open() call will not return until all records are
built up in client-sided memory.
If you open a Recordset, server-sided, then the Open() call will return as
soon as CacheSize records has been retrieved or the end of the records which
ever is first.
It is not specified what happens if you ask for Server-sided and
asynchronous.
I should imagine asynchronous is ignored.
Do While rs.State <> adStateOpen
' (nothing)
Loop
Surely you want
Do While rs.State <> adStateOpen
DoEvents
Loop
to give ADO more time to complete its action?
Stephen Howe
However, within the loop, the state never changes. I actually included a
timer to prevent an endless loop, and when I add a debug.print inside the
loop, even when I set it for 15 seconds it still stays in the fetching
state
(9) for the full period. I guess the fetch is stalled while loop is
running.
Can anyone suggest an alternate way to wait until the recordset is built
before doing the find?
The platform is MS Access.
TIA,
Joel
.
- Follow-Ups:
- Re: Waiting for a recordset to finish fetching
- From: JoelB
- Re: Waiting for a recordset to finish fetching
- Prev by Date: Re: Waiting for a recordset to finish fetching
- Next by Date: Re: Waiting for a recordset to finish fetching
- Previous by thread: Re: Waiting for a recordset to finish fetching
- Next by thread: Re: Waiting for a recordset to finish fetching
- Index(es):
Relevant Pages
|
|