VB.Net and SQL Server 2000

lobosurf5

New member
Joined
Sep 7, 2006
Messages
3
Programming Experience
Beginner
I am devolping a windows form application which connects to a database in SQL Server 2000.

In this form I have a Bouncing Progress Bar which I want to use whenever the program is searching for data. The application uses a stored procedure that takes awhile to return a value. During the search the Bouncing Progress Bar does not move until SQL finishes and sends its result back to the application.

Is there a way to keep code running in the application while it's waiting for SQL to return results?

Help Please
Thank You!!!
 
Short answer: No

Slightly longer answer: Yes but takes a little work

Even longer answer: Yes, it's possible but you would need to learn how to create and handle delegates and spin off a process thread that does the data revieval. Once it's done, it uses the delegate to pass the information back, and you can then stop the progress bar. It also means you have to wait for the data to come back before continuing.... ah, it gets complicated.

-tg
 
Thanks for the info. Found what I wanted using threading.

Private t As System.Threading.Thread
t = New System.Threading.Thread(AddressOf Me.BackgroundProcess)

The BackgroundProcess runs the StoredProcedure while the application continues to control the Bouncing progress bar. Once the thread finishes it returns its value to the application and the program continues to run as normal.
 
Last edited:
Back
Top