Re: Waiting for a recordset to finish fetching



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



.



Relevant Pages

  • RE: Collect the data
    ... I am not sure if you're referring to "dataset" as recordset. ... that data as necessary before you make the permanent update to the database. ... fetching the data from database each time of update. ... "Vivek Sharma" wrote: ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Collect the data
    ... > I am not sure if you're referring to "dataset" as recordset. ... So, you can use dataset to have your own copy of data, modify ... > fetching the data from database each time of update. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: DAO MUCH faster than ADO in this test
    ... DAO is well-known to be faster than ADO. ... Of course the DAO loop ran faster than the SQL loop; ... advantage of a table-type recordset, which only works on local tables. ... Dim starttime As Single, finishtime As Single ...
    (microsoft.public.access.modulesdaovba)
  • Re: Do While Loop nested in another While causes error
    ... still doesn't explain why a nested DO loop would cause problems. ... Until you sort out the contents of the recordset, ... idHolder = rsGuestbook ... display that new ID. ...
    (microsoft.public.inetserver.asp.db)
  • Re: One more ! Calculating Recordset Values
    ... Well I am almost there lol, got the recordset to work properly returning all ... the values in the one "loop" so to speak and I can see them being returned ... >> Dim aTot, eTot, iTot, pSubTot, aStrengthSubTot, PTotal, SubTotal, ... >>> totals ...
    (microsoft.public.frontpage.programming)