|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
how can i do this?
i have 2 running programs using the same database (Students and Subjects). then i have one more central program that also accesses the same db. i want it that when the central program makes any modification to the student or subject table, the other 2 programs would know it and they would execute appropriate code (like updating a listview). anyone please? thanks |
|
#2
|
|||
|
|||
|
Are these web applications or desktop applications? One approach is to flag a field in the database that each application will check for on predefined intervals. If the flag is true they will execute their code. If the applications are able to communicate, via sockets or something similar you can have the `server` send the clients the commands directly.
|
|
#3
|
||||
|
||||
|
You could also make the two smaller programs ActiveX apps, then call their methods from the bigger program. But that only works if they're all running on the same machine.
If you have multiple student/subject programs running on multiple machines, with the bigger program running on a single machine, just have the smaller programs occasionaly quiry the main program via a TCP connection. Or just do what victorpendleton says and set a flag in the database. ![]() |
|
#4
|
|||
|
|||
|
is that how they really do it? i mean im willing to do what you both mentioned but is that an efficient method?
|
|
#5
|
||||
|
||||
|
Actually, if they are activex executables or dlls then no, they do not have to be on the same machine. You can connect via DCOM to create an instance of the object on another machine. You have to alter a couple of settings on the host machine to allow for the connection and then specify the computer to connect to via the CreateObject() function.
i.e. Set myVar = CreateObject("your_object_name", "the_other_computer") |
|
#6
|
|||
|
|||
|
Personally I would probably do this with the winsock control. Then it can be done without polling.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > how to send a message to anexternal program |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|