I actually dont know If What I need is a WebService


New member
Jun 9, 2006
Programming Experience
here's how it is... I have two users using the system concurrently(at the same time). These two users are looking at the same data from the database... but viewing that data from different web forms. Webform 1 needs to be refreshed (updated) whenever an instance of Webform 2 is doing an update to the database. So that when you look at Webform1 you see the data as it currently is... I mean the most recently updated data...

So my problem is, quite specifically:

How does Webform 2 tell Webform 1 that it is doing an update especially if they are running at different computers and occur in different sessions?

Can I trigger an event? How can that event be made to tell other instances of the webform, and in my case, other webforms on different sessions?

Anyway, Thanks and I hope I can jump in on some of your problems in the future... I just need this one so badly.


Well-known member
Jun 3, 2004
Programming Experience
no there is no easy way to do this, because webpages and webservices use the http protocol which is a disconnected protocol, what I mean by that is that when a request is made the server processes the request and sends a response. After that the server hasn't got any clue about the previous process.

There are a couple of options that come in mind:
- Implement concurrency using some sort of timestamp. When page1 makes a postback the pages timestamp is being compared with the current timestamp of the data it is trying to change. If the timestamp is older you can show a message on the page.
- Implement the previous option using AJAX and poll the server every X seconds (Be aware that this is possible in a low user environment because polling the server causes a lot of trafic on the network and also overhead at the serverside each time it has to check the timestamps) When using this option you should be making use of some caching mechanism for the timestamps so databaseaccess isn't required everytime the server needs to check the timestamp.

To answer your question about using a webservice... Well it depends on the solution you will be choosing. The advantage to a webservice is that centralize the logic off your application.
Top Bottom