Maybe LOGOUT / COMMIT is preferable over LOCK and HOLD?
LOGOUT does tend to create program hangs, at least when I tried it with a dozen people creating records in topspeed files at exactly the same time. But maybe LOCK and HOLD create hangs too?
Before issuing the LOGOUT command, I have the program delay a random amount of time. So, if an instructor in a classroom tells the students to hit the "Create" button at the same time there is a lower chance of workstations hanging.
I know the documentation for LOCK and HOLD talks about "deadly embrace". That applies to LOGOUT as well, so I designed a common routine that I call to issue the LOGOUT, I always list a particular Control file first and then I always list the Parent and Child tables in a specific order. But, listing the files always in the same sequence and always including a common table, first, was not enough to avoid program hangs. Hence I put in the random delay.
Using the common routine to issue the LOGOUT command allows me to display a "Retry, Cancel" window if the program is not able to get the LOGOUT successfully within a timeout period. BTW, don't use MESSAGE as the Retry/Cancel prompt, as that blocks other parts of the program from operating.
P.S. I forgot to mention I was using the TopSpeed driver underneath the IP Driver. So, it is possible the hung workstations had more to do with the IP Driver driver not working very well with LOCK / HOLD and-or LOGOUT.