Show progress with an Asynchronous ADO recordset

V

vbasean

Hey all,

I'm trying to show progress on a large recordset
I've dim'd an ADO recordset with events

Dim WithEvents rst as ADODB.Recordset

I've added the event for progress with a call to set a range with the progress

I've set the screen to updating

but it just won't show my progress, it locks up on the recordset open
statement and does it's work without showing progress.

Any suggestions?
 
M

Mike

Not sure without seeing your code but this is what i would do.
As your looping thru your recordset why not
rowNumber = 2 'Starting Row Number for data
Do While (Not rs.EOF)
Range("A1") = "Record number " r -2& " of " & rs.recordcount
rowNumber = rowNumber + 1
rs.MoveNext
Loop
 
V

vbasean

that's the whole deal. I'm not looping through the records. All I'm doing is:
1) Open
2) range("A1").copyfromrecordset rst

two operations that progress through the recordset and I just want to show
that progress.
 
V

vbasean

I wish.. :D

try 4 minutes to open and 4 minutes to copy

i'm opening with the option of adAsyncFetch and I want the 'FetchProgress'
event to fire and show progress on the Worksheet.

what it appears is happening is that at first it progresses (2 steps) but
then it locks and waits until the operation is complete and then fires
another 'FetchProgress'
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top