从SQL Server数据库获取消息数据 [英] Getting message data from SQL Server database
本文介绍了从SQL Server数据库获取消息数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在设计一个基本的聊天应用程序。我所做的是,当用户键入消息时,它只是存储到数据库中,然后我放了一个计时器,每秒检查一次数据库以获取新消息。
我想知道是否有其他方法可以做到这一点,我的意思是客户端应用程序每秒检查一次新消息,是否有任何方式数据库可以在有新消息时向用户发送通知?
谢谢
解决方案
检查SignalR: http://www.asp.net/signalr [ ^ 一>
Hi,
I am designing a basic chat application. What I have done is, when a user types a message, it is simply stored to database, then I have put a timer which checks database every second for a new message.
I want to know if there is any other way to do it, I mean instead client application to check for new message every second, is there any way that database could send notification to users whenever there is a new message?
Thanks
解决方案
Check SignalR: http://www.asp.net/signalr[^]
这篇关于从SQL Server数据库获取消息数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文