Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Guys.
i have a question.there are two pcs working in lan.in one pc my c# application recieves data.while on other system that data should automatically display as & when the database gets updated by 1st pc.

Example:
when u order pizza at pizza store .sales guy feeds that order in the system & it automatically goes to the kitchen department to cook that pizza.so in kitchen the order list should get automatically update as & when sales guy takes new order.
the order list should display in datagridview in c#.


Thanks.
Posted
Comments
Sandeep Mewara 18-Oct-12 14:22pm    
And the issue is? you tried and got stuck... anywhere?
adriancs 18-Oct-12 20:17pm    
Use a timer on 2nd pc to check the database for changes periodically to detect any updates from 1st pc.
Jephunneh Malazarte 18-Oct-12 22:54pm    
when you send your data, are you sending it via port? if so then probably you can listen to an incoming message on that port.

Hi,

a) First option is Timer.

b) If you are using one centralized data then you can use sqlcache dependency.

c) if different databases then you can use database mirroring.
 
Share this answer
 
The listening application should have a thread dedicated to checking the database on an interval.
The thread is used to that the UI can be updated while the listener is doing its thing.
As Solution 1 says, use a Timer as a way to perform the periodic checks.
 
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