查看: 861|回复: 6
|
如何在asp.net 里set timer retrive database?
[复制链接]
|
|
如何在asp.net 里set timer retrive database?
我想让asp.net 里每隔五分钟就有query 去retrive database,, 如果有record 是 match query 的话。。会从databse 拿Record 然后去做一些function..请问怎样能够做到呢? |
|
|
|
|
|
|
|
发表于 8-10-2006 02:09 PM
|
显示全部楼层
可以用普通的html refresh来做到。
也可以用AJAX来做 |
|
|
|
|
|
|
|

楼主 |
发表于 8-10-2006 02:25 PM
|
显示全部楼层
原帖由 红发 于 8-10-2006 02:09 PM 发表
可以用普通的html refresh来做到。
也可以用AJAX来做
嗯。。我想要的其实不是想postback 的东西。。
我想问,假如我没有开webpage , 可是却要run 我 web apps 的 code behind 的 function ..能够吗?
我的目的是, system 会 把现在的时间compare with databse 的record 的 data.. 如果现在的时间是 和 record 的 date 一样, 就会去拿一些record 然后 send sms 。。
我在想, send sms 的code 在 cs file 里。。。
可是我没有run web apps... 有可能mssql 自己check record each 5 minutes 然后 match 再 run 那个 cs file 里 send sms 的 code?
还是说。。 我需要create 一个 web page, code behind 的 page load 里 有 timer 的 code for each 5 min postback web page, 那后就去retrieve database record and check if match then call send sms code?
就是说, 我server 那边要一直开着那个webpage, 让它自己refresh n do pageload 的 function ?? |
|
|
|
|
|
|
|
发表于 8-10-2006 03:47 PM
|
显示全部楼层
原帖由 zuying1985 于 8-10-2006 02:25 PM 发表
我想问,假如我没有开webpage , 可是却要run 我 web apps 的 code behind 的 function ..能够吗?
我的目的是, system 会 把现在的时间compare with dat ...
朋友,
没有user interaction,为何硬塞个user interface 给它?
到不如用vb写console app。然后放scheduled task.
[ 本帖最后由 tensaix2j 于 8-10-2006 04:03 PM 编辑 ] |
|
|
|
|
|
|
|

楼主 |
发表于 8-10-2006 05:11 PM
|
显示全部楼层
原帖由 tensaix2j 于 8-10-2006 03:47 PM 发表
朋友,
没有user interaction,为何硬塞个user interface 给它?
到不如用vb写console app。然后放scheduled task.
对,我也是想到这个。,没有必要做web apps. 所以现在我已经在做着console 的了。。
[ 本帖最后由 zuying1985 于 8-10-2006 05:13 PM 编辑 ] |
|
|
|
|
|
|
|
发表于 12-10-2006 08:29 PM
|
显示全部楼层
原帖由 zuying1985 于 8-10-2006 02:25 PM 发表
嗯。。我想要的其实不是想postback 的东西。。
我想问,假如我没有开webpage , 可是却要run 我 web apps 的 code behind 的 function ..能够吗?
我的目的是, system 会 把现在的时间compare with dat ...
照你這樣說,你這個應該是real-time application吧? |
|
|
|
|
|
|
|
发表于 13-10-2006 10:59 AM
|
显示全部楼层
|
|
|
|
|
|
| |
本周最热论坛帖子
|