January 8, 200125 yr Has anyone come up with a really robust way of preventing more than one user in a multi-user database from running a particular script at the same time? I have a few ideas based on having the script test and then enter a particular field in a separate file which would then lock out others, but was wondering if anyone has experience with this before I spend a lot of time and effort testing the idea.
January 9, 200125 yr I was going to suggest using the Status[CurrentMultiUserStatus] function, but that would only allow the script to be run based on the number of current users, which is different from what you are asking for (lockout of script performance). Your suggestion is the only way that I can think of. Is it robust? Well, any system that relies on the setting of a field value is open to errors if the process is aborted before completion.
January 9, 200125 yr A frequent problem with setting flags is that an abnormal exit from FM prevents the flag from being reset and everyone is locked out until the flag is manually reset. Having said that, I don't know of a better way to do this sort of locking. -bd
January 9, 200125 yr Author I was sort of thinking that I wouldn't actually change the value of the test field. I would just use the 'go to field' step and then check to see if that produces a locked record error. If so, the script would loop through a pause then test again etc. Oh well, I guess there's only one way to find out. BTW, this is related to an earlier post of mine where I suspected that two users simultaneously running the same script were causing some records to get corrupted. We did some testing, and it looks like that was the cause of the problem. Now, I just have to find a solution.
Create an account or sign in to comment