Click here to Skip to main content
15,896,359 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi
I have 10 Stored procedrues which I want to run on a page load.
Each stored procedrue is going to give me different result set.
My clients wants see like one by one. If I am retrieving one stored procedure then retrieve data then automatically without clicking anything it will call 2nd and retrieve data on page and again without clicking anything call 3rd and so on.
How do I do that?
Send me the progamming logic as well.
Thanks.
Posted
Comments
Sergey Alexandrovich Kryukov 4-Oct-11 16:35pm    
What do you mean "retrieving one stored procedure"? You just call it and retrieve the result set...
--SA

1 solution

I realize this is your first post on CP, but asking for code is not generally accepted, the goal in this Q&A is to teach inquirers how to solve their problem, sometimes the problem is so simple that just showing a couple of line of code with a bit of explanation is good enough, in this case I won't do that.

That said I will try to answer your question. And if I understand your problem correctly you need to display the result of 10 stored procedures one at a time with a certain interval.

0) Create a list of procedures you wish to call, this can be either string with the names or delegates which does the actual work
1) Create an integer field which tells us which procedure to call next
2) start a Timer[^] set the interval property and elapsed event;
3) Start the timer
4) When the timer elapses you execute the procedure at the index of the field created in 1) and display the result in the UI
5) If the last procedure was executed, then stop the timer.
 
Share this answer
 
Comments
Espen Harlinn 5-Oct-11 18:23pm    
Definitely workable, my 5
Simon Bang Terkildsen 6-Oct-11 12:19pm    
Much appreciated, Espen

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900