I want to build a windows application in Visual Studio 2005 that grabs some data from a SQL DB and displays it in a gridview. That is easy and I already have it done, but I also want to know how to show this data in real-time. For example: right now we have a application that pulls some login information for all the users and displays their phone extension, their name, and their status. They can change their status by clicking on some radios below the datagrid and on change it updates the data and then posts back. However, I dont know how the guy who did it made it so that these local changes are automatically shown on everyone elses computers around the office. In other words, they are shown the live data as it changes, without having to refresh it or anything. How would I go about doing this or does anyone have any places/resources that could help me accomplish this task. Thanks.
Oh and the guy who wrote this is no longer working here and he deleted the source code so i cant look at it.
Here's the answer I got from one of our Dev:
there are two methods, a push method or a pull method: you could use something like NotificationServices (I haven't used this. There's some data on it athttp://msdn2.microsoft.com/en-us/library/ms170722(en-US,SQL.90).aspx) to tell you that the data has changed, or you could poll at intervals (or during lulls in processing time) for changes in data.
Either way you go, you're going to face problems of collisions if the users can change the same data. What would you do if you're in the middle of editing a row, and another user deletes it, and you poll for data?
Hope that helps,
Lan
|||
thanks for the reply. the application is designed to only allow the user to change their own data, therefore there will be no way that any user can be changing the same data. I will take a look at that article.
No comments:
Post a Comment