VB.Net 3.5 和 SQL Server 2005 Windows 聊天应用程序

发布于 2024-08-11 09:02:44 字数 342 浏览 3 评论 0原文

目前以下是我需要为大学作业提交的项目: 一个 vb.net 聊天应用程序,带有 ms sql server 2k5 后端,最多 100 个用户,具有文件传输、一对一和群聊功能。管理员将创建聊天室,该聊天室将受密码保护以进行群聊。 我们需要实现多线程来从服务器获取新的聊天消息并更新聊天 UI,但我遇到困难的是,我知道 sql server 中有一个功能,使用该功能数据库服务器会自动通知客户端(如果有)新数据,然后只有客户端才会发送请求以获取新的聊天消息。因为每 1/2 秒发送一次新的聊天消息请求并不是一个好的解决方案,因为它会增加网络流量。

请让我知道你的想法。高度赞赏提供帮助的示例代码或文章链接。非常感谢您提前提供的帮助。

此致。

Currently following is the project I need to submit for my college assignment:
A vb.net chat application with a ms sql server 2k5 backend, max 100 users with file transfer, one to one and group chat facility. Admin will create chat rooms which will be password protected for group chats.
We will need to implement multithreading to fectch new chat messages from server and update the chat UI, but where I am getting stuck is, I know there is a feature in sql server using which the db server will automatically notify the clients if there is any new data and then only the client will send a request to fetch new chat messages. Cause sending new chat messages requests every 1/2 seconds is not a good solution as it will increase the network traffic.

Please let me have your ides. Sample codes or links to artciles which cud help are highly appreciated. Many many thanks for your kind help in advance.

Best regards.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

丢了幸福的猪 2024-08-18 09:02:44

您正在寻找的 Sql 2005+ 中的功能称为查询通知.NET 中的 SqlDependency 库。尝试阅读其中几篇文章,了解如何使用它们 Sql Server,如何在 .net 代码项目 中使用它们,以及其他所有内容google 可以在 Sql Server 中告诉您有关它们的信息.NET

The feature in Sql 2005+ that you are looking for is called query notifications and the SqlDependency library in .NET. Try a few of these articles for tips on how to use them in Sql Server, how to use them in .net code projects, and everything else google can tell you about them in Sql Server and .NET.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文