Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
hi i have windows application it is install on 5 pc and i want the user take message for other and the message will be save in the Sql server.how can i do it?
in fact how can i Listen to the Sql server and understand a new message is receive and show it to the user?
Posted
Comments
Sergey Alexandrovich Kryukov 28-Oct-14 0:51am    
What does it mean, "listen to the SQL server"? It's the server, it listens...
—SA
George Jonsson 28-Oct-14 0:53am    
It is not really clear what you want.
Even if English is not your first language, try to write understandable text.
Robert Welliever 28-Oct-14 1:00am    
You can launch a thread in your application that polls Sql Server for change every so often. If that thread detects change then it can signal to the application. Your "message" queue could just be records in a table called Messages.
sortami 28-Oct-14 1:02am    
so thanks but how can i do it?
Robert Welliever 28-Oct-14 1:14am    
What do you mean? Your application can write a message to the queue by using a Sql insert statement. Your Queue listener is a C# thread that uses a Sql select statement to check for messages. It checks then sleeps, checks then sleeps. If it checks and finds a message, then that thread calls whatever function you have associated with a particular message. I'm sorry I couldn't write that code for you without getting paid. That's a good half hour's work and would deprive you of the learning you need.

Hello,

Please have a look at Squiggle[^].

Regards,
 
Share this answer
 
This one is funny or dirty as you may.

Install Dropbox on the 5 pc's and let SQL server write a file with the message to the dropbox folder. The folder will Sync to all local pc's. :-) . Build a listener using the file watcher component in .Net.
 
Share this answer
 
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900