-2

need help please.. I'm currently developing a simple queuing system for our cashier using PB7. is there a way to trigger event from the PCs of window 1 and 2 to the server computer which displays the number being called by window 1 and 2? (we have a 3 computer setup pc1 = caller from window 1, pc2 = caller from window 2, pc3 = facilitates number displays.)

iv'e already tried findwindow function paired with the send function but it seems to work only in 1 computer.

Some friends suggested socket programming but i cannot find examples over the internet..

Thanks for the help.

  • ernesto, take a look at shared objects. I don't have time to flesh out a proper response but Terry Voth has a decent explanation here. http://www.techno-kitten.com/Changes_to_PowerBuilder/New_In_PowerBuilder_6/NewPB6_-_Shared_Objects/NewPB6_-_Example_of_Using_a_Sh/newpb6_-_example_of_using_a_sh.html – Eric Glenn Jan 15 '20 at 16:24

1 Answers1

1

If you are using a database you can insert your numbers into a table (PC1 and PC2 doing this). Then write a method on PC3 to read the latest numbers from the table via a datawindow or datastore. This method would have to be triggered by a timer at some set interval, say every few seconds.

If you don't use a database you can do the same thing via text files. PC1 and PC2 would have to write their numbers into a text file and then save it in a common folder on the network. PC3 would then, at some defined interval, look for the text file, open it, read the number, then display it.

Matt Balent
  • 2,337
  • 2
  • 20
  • 23
  • Thanks for the reply sir, its what i did right now since i cannot really have much knowledge and reference on socket programming on PB. But i think its more efficient will only be executed when triggered.. – ernesto Nov 28 '19 at 00:52
  • If you wanted efficiency you wouldn't be using a twenty year old version of PB. – Matt Balent Nov 30 '19 at 18:43