Recordcount for datareader progressbar?

reivax

New member
Joined
Feb 22, 2007
Messages
2
Location
Philippines
Programming Experience
5-10
Hi All,I'm using a DataReader to loop into my query and I want to use a progressbar to see the progress of my loop and we all know that using a progressbar we need to set its maximum property. The problem is this, i can't see any property so that i would know the recordcount or the row count of my datareader. Can anybody help me on how can i set the max property of the progressbar depends on how many rows i got in my query?Thanks so much in advance for your help,Reivax
 
run a SELECT count(*) query with the same tables and where conditions first... if youre really that bothered. The only thing your progress bar will show is how fast the data downloads from the database.. it will NOT show query progress.

i.e. if its a complicated query, your progress bar will hang at 0% for a minute, then zoom to 100% in a few seconds.. Rather pointless, i've found..

The best thing we have decided, in another thread here recently, is to draw some pretty pictures (like the windows file copy paper-flies-from-folder-to-folder dialog) and inform the user of the average time needed to run this query.. (Time it each time and keep a record)
 
Back
Top