I have a C# program that works with an SQL Server database. The setup is supposed to work over a LAN.
Now, if I insert a value into the server using a program from Computer A, how would I automatically read that data from the program in Computer B?
Basically, if I, for example, edit a text field and saved the contents to the database, the other program should update its own text field to match that of the host’s.
My idea was to periodically check the database every… 2 seconds or so via a timer. Would there be performance problems with that approach? Most of the time I only need to read 1 row at a time, and the contents of the row are simple numbers and strings, nothing too big.
Are there any other approaches to this?
Thanks in advanced.
P.S. Running SQL Server 2005 Express and Visual Studio 2005, if that means anything.
You could periodically check the database from computer b. Add an lastupdated datetime field to the rows and only pull across the rows that have been updated / inserted since the last time the application ran on computer b.
This is much more of a decoupled solution in my opinion