Re: ADO vs. Progress Bar



Hatim wrote on Sun, 25 Sep 2005 02:09:02 -0700:

> It seems that your suggestion in the first reply is satisfying my
> requirements. I mean:
>> Is it using an ADO object like a Recordset?
>> If so, you want the FetchProgress event.
> So let us focus on the FetchProgress event for a recordset object. I feel
> that it is my need.
> Thus, consider these lines of code:
> 1 Dim Conn As New ADODB.Connection
> 2 Dim rs As New ADODB.Recordset
> 3 Conn.Open "A Connection string"
> 4 rs.Open "A SQL Statement", Conn
>
> My problem here is that when the program reaches line 4, the application
> become very heavy. It takes a lot of time for the application to wake up
> (from 15 to 60 minutes depending on the network connection, the SQL
> statement, Server status, etc.).
> So my need here is to show the progressing status of data retrieving to
> the end user. I hope it is clear now.
>

You need to set the option for asynchronous record retrieval. Look in the
help for references to

adAsyncExecute
adAsyncFetch
adAsyncFetchNonBlocking

along with the FetchProgress event.

Dan

Dan


.



Relevant Pages

  • cant handle error in async recordset
    ... rs.Open pSql, oDb, adOpenForwardOnly, adLockReadOnly, adAsyncExecute + ... I use the FetchComplete event for doing something when the open has finished. ... handle it because no error is raised, no recordset events are raised too. ... My connection is a public connection and i cannont declare it with ...
    (microsoft.public.data.ado)
  • cant handle error in async recordset
    ... rs.Open pSql, oDb, adOpenForwardOnly, adLockReadOnly, adAsyncExecute + ... I use the FetchComplete event for doing something when the open has finished. ... handle it because no error is raised, no recordset events are raised too. ... My connection is a public connection and i cannont declare it with ...
    (microsoft.public.vb.database.ado)
  • Re: .Fill in OleDbDataAdapter
    ... the ADO object when the fill operation is complete. ... Close when you are finished using ADO Recordset or Record objects. ... Secondly, you say that it doesn't work with XML persistence, can you post ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: How to cancel SQL query from VBA ADO?
    ... I can at least get the recordset to fetch asynchronously in Excel ... to SQL 2005. ... find an example in VBA only C++. ... recordset to work asynchronously, by passing (adAsyncExecute Or ...
    (microsoft.public.vb.database.ado)
  • Re: recordset dynamic properties
    ... Some of those properties don't exist before you open the Recordset. ... At the point of opening, ... You have tried adAsyncExecute, adAsyncFetch, adAsyncFetchNonBlocking ??? ... Stephen Howe ...
    (microsoft.public.data.ado)