VB.Net 3.5 and SQL Server 2005 Windows Chat Application
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 wil开发者_高级运维l 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.
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.
精彩评论