一对一检索存储过程 [英] Retrieve stored procedure one by one

查看:83
本文介绍了一对一检索存储过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我有10个要在页面加载时运行的存储过程.
每个存储的过程都会给我不同的结果集.
我的客户希望一一看到.如果我要检索一个存储过程,则先检索数据,然后不单击任何内容便会自动调用2nd并检索页面上的数据,然后再次单击而又不单击任何内容便会调用3rd等等. 我该怎么办?
也向我发送编程逻辑.
谢谢.

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.

推荐答案

我意识到这是您关于CP的第一篇文章,但是要求代码不被普遍接受,本问答中的目标是教问查询者要解决他们的问题,有时问题是如此简单,以至于只需显示几行代码并有一点解释就足够了,在这种情况下,我不会这样做.

就是说,我会尽力回答您的问题.而且,如果我正确理解了您的问题,则需要以一定的时间间隔一次显示10个存储过程的结果.

0)创建一个您希望调用的过程列表,该列表可以是带有名称的字符串,也可以是代表实际工作的委托
1)创建一个整数字段,告诉我们接下来要调用哪个过程
2)启动计时器 [
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.


这篇关于一对一检索存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆