>
>Thank you this is a good point.
>I do want to limit to “x” users using the system simultaneously. I like your idea of using LOCATE for RLOCK(), and I guess I could do that and if all records are locked I would have to check for record count and decide if I will allow to add another record for a new user or deny them a connection, but now the code losing its beauty again. For now I have to figure out the RLOCK() problem.
Yelena,
Have you considered using a method of semaphore file locks instead of RLOCK() for limiting users? In my application where I need to lock in or out users I use this method. I think it is more reliable than RLOCK(). You can create a bunch of semaphore files like simple empty text files FILE1, FILE2, and so on. Then when a user enters the application one of the semaphore files is locked (using FOPEN() function). When a user cannot find a semaphore file to lock, they have to wait.
HTH
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham