Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Real Time Programming

Posted on 2002-07-01
7
Medium Priority
?
142 Views
Last Modified: 2013-11-13
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 ?
0
Comment
Question by:computech1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 43

Expert Comment

by:TimCottee
ID: 7121831
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.
0
 
LVL 1

Expert Comment

by:thanes
ID: 7121942
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
0
 

Author Comment

by:computech1
ID: 7121990
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 ?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 43

Accepted Solution

by:
TimCottee earned 200 total points
ID: 7122022
Essentially yes, though it wasn't really a serious suggestion as this kind of system ends up generating so much network traffic and also uses a lot of CPU time on each machine making it practically impossible to use.

Simple messaging is really what I was suggesting in a way (without being that precise). The whole point is that you have some centralised location where you register the fact that an update has occured, then you use this to inform all clients that a change has occured and they can then decide whether to refresh the data.

Using MSMQ or some other message queuing system is a perfectly good way of doing this, likewise sending a simple message using Winsock to a list of registered clients would work well. However if you use a method like this you would probably also want to include a time-based refresh method as well to allow for the fact that the server application may not be available or that messages may not have reached the clients in an appropriate timeframe. Using MSMQ should handle much of this as it does "guarantee" delivery of the messages by using handshaking etc.

The question for you then becomes how much (time/money) do you have to spend on this task and whether it is appropriate for the situation.
0
 

Author Comment

by:computech1
ID: 7127170
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 ?
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7970966
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
0
 

Expert Comment

by:SpideyMod
ID: 8018542
Per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question