Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update DataTable when data changes in DB

Status
Not open for further replies.

MaxZak

Programmer
Oct 5, 2001
116
IT
I have 2 applications in 2 different PC that use the same DB.
I want that changes made by an app become immediately visible in the other (in the DataTable changed).
I'd like to do that without use of timers that would create network traffic and would introduce a delay on the visualization of the new data.

I hope you understook my problem and I apologize for my poor english.

Thanks in advance.
MaxZak
 
Does your DB support triggers? If so, perhaps you could set up a trigger to notify clients whenever a change is made, but I'm not sure of the exact code to do this.

Another possibility is to add a middle tier to the app. This middle layer would be responsible for all database interaction, and the clients would connect to this layer to retrieve data and submit changes, additions, etc. When one client changes the DB, the middle tier could then notify clients that the data has changed.





I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson
 
If I add a middle tier, how can clients be notified of data changing? Do I have to use remoting?

Thanks again
 
You could use Winsock and have the middle tier (server) send a message to the clients, and that could trigger the clients to re-fetch their data so as to get any changes.


I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top