Link to home
Start Free TrialLog in
Avatar of computech1
computech1

asked on

Real Time Programming

Hi There,

I what to do a simple prog.

2 clients with DataGrid connecting to the same Access DB, showing the same table.

I want when 1 client update somting in the table, the other client AUTOMATICLY update the view of his datagrid.

How ?
Avatar of TimCottee
TimCottee
Flag of United Kingdom of Great Britain and Northern Ireland image

This is a fairly common request, in order to achieve this you need to do one of two things; either create a pull system whereby all clients poll a specific table on a regular basis (many times a second perhaps) and thereby refresh their data or a push system whereby all clients register with a server that then informs all clients when a change has been made.

Either way it is not something that you can just turn on.
Polling is seldom practical or efficient.  Another approach to use (if you want to go deeper) is using a message queue like MSMQ (Microsoft Message Queue).  Comes with Win2K server and allows you to basically setup a simple messaging system.  You would have to have your apps communicating through the message queue informing the other instances of your app when they've updated the table(s).  You will want to probably pickup a book that covers MSMQ (or whatever its called these days) with good examples.  Best of luck.

Regards, Thane Schaffer
Avatar of computech1
computech1

ASKER

What about sending simple massage using UDP or TCP/IP ?

TimCottee , can u be more specific ? what do u mean by :
"create a pull system whereby all clients poll a specific table on a regular basis"

U mean all clients will make requery each few sec ?
ASKER CERTIFIED SOLUTION
Avatar of TimCottee
TimCottee
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The prob with winsock is that when the list of ppl gets the massage to make update, several access is made to the DB at the same mil sec . the outcome of this : no ALL the clients success to update.

How can I solve it ? Timer dealing the accessing to the DB in a diffrent time for each client ?
Avatar of DanRollins
Hi computech1,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept TimCottee's comment(s) as an answer.

computech1, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
Per recommendation

SpideyMod
Community Support Moderator @Experts Exchange