Connecting Tech Pros Worldwide Help | Site Map

Progress Bar

OuTCasT's Avatar
Needs Regular Fix
 
Join Date: Jan 2008
Location: South Africa
Posts: 353
#1: Sep 4 '09
Hi
I'm trying to get a progress bar to run while i execute a sql query.
Having trouble.

Can someone help.

I just want the progressbar to run while the select query is running to show there is something happening
Frinavale's Avatar
Site Moderator
 
Join Date: Oct 2006
Location: The Great White North
Posts: 5,074
#2: Sep 4 '09

re: Progress Bar


What type of application is this?
I don't know if it's possible to determine how long it's going to take for a SQL query to execute....unless you're executing multiple SQL queries and you have an idea of how far along in the process you are....
OuTCasT's Avatar
Needs Regular Fix
 
Join Date: Jan 2008
Location: South Africa
Posts: 353
#3: Sep 7 '09

re: Progress Bar


Well couldnt I maybe do a select query and fill a dataTable and then loop through the datarows and with the count run the progressbar ? and then when its done display the data ???
Frinavale's Avatar
Site Moderator
 
Join Date: Oct 2006
Location: The Great White North
Posts: 5,074
#4: Sep 7 '09

re: Progress Bar


Sure, but why do you have to loop through anything?
OuTCasT's Avatar
Needs Regular Fix
 
Join Date: Jan 2008
Location: South Africa
Posts: 353
#5: Sep 8 '09

re: Progress Bar


Thought to step the progressbars value up by one you need to count the records.
Frinavale's Avatar
Site Moderator
 
Join Date: Oct 2006
Location: The Great White North
Posts: 5,074
#6: Sep 8 '09

re: Progress Bar


Seems like you're just adding complexity that doesn't need to be there....if you've already retrieved your data it's likely to be in DataTables already.

Looping through the rows of the table(s) just to show progress seems...kind of pointless: the big work (retrieving the data) is already done.

-Frinny
Plater's Avatar
Moderator
 
Join Date: Apr 2007
Location: New England
Posts: 7,148
#7: Sep 8 '09

re: Progress Bar


I recomend just a "Loading..." or some other type of popup for this type of function
Reply