jasonwood Posted January 19, 2003 Posted January 19, 2003 If I put a global in a db with only one record... will multiple users be able to modify that global at the same time? I know the values of globals are unique to each user, but will it allow two people to modify it when they're on the same record?
djgogi Posted January 20, 2003 Posted January 20, 2003 When you put the cursor into field you lock the record (there is many other way to lock the record) even if the field is global Dj
jasonwood Posted January 20, 2003 Author Posted January 20, 2003 Does anyone have any good workarounds? I am using this for a login screen which comes up when the database opens. People don't spend a lot of time on the login screen, but in my case, I expect most people to try to login at about the same time. there is many other way to lock the record What are these other ways (other than putting a cursor in a field)?
Kurt Knippel Posted January 20, 2003 Posted January 20, 2003 What happens will depend upon the EXACT process that the users will go through. Without knowing the exact process it is impossible to predict what will happen and how to prevent this. The example above about locking the record is a bit simplistic and presumes that the user has actually clicked into the field in question and then left the terminal. Now this may happen as part of your process, but it also may not. So what is the exact process that your users will be following?
BobWeaver Posted January 20, 2003 Posted January 20, 2003 One possible workaround is to create a new record in the login file whenever a user logs in, and then delete it when they log out. Script it so that each user remains on his/her own record while using the system so that they don't interfere with each other. This is essentially the method used in the Moyer and Bowers book to avoid this problem.
jasonwood Posted January 20, 2003 Author Posted January 20, 2003 Hi Kurt, My concern is not so much if someone clicks in the field then walks away, but the few seconds in which they are entering data. Basically here's how I have it set up: The "Main" db opens, goes to a login screen. User enters username/password then clicks enter. After that I don't have to worry about it because there are no more fields in this db (not that normal users will see anyway). Bob, I really like your suggestion. Unfortunately, my login file is also my configuration (preferences) file, so it was not intended to have more than one record, and I wanted to disallow record creation/deletion to keep it that way. So I guess I should either make a separate "Preferences" file so that the login file is only that (probably what I should have done in the first place), or just implement your suggestion with the existing file and put some protections in place to make sure users don't delete the first record, etc. Any thoughts?
BobWeaver Posted January 21, 2003 Posted January 21, 2003 You might want to implement the Moyer/Bowers login system, rather than reinvent the wheel. This login system is implemented in Brian Kennedy's revised starter template in this thread: http://www.fmforums.com/threads/showflat.php?Cat=&Board=files&Number=46219&page=0&view=collapsed&sb=5&o=365&fpart=1 Make sure you download the revised one, not the first one posted.
djgogi Posted January 21, 2003 Posted January 21, 2003 What are these other ways (other than putting a cursor in a field)? 1) Selecting portal row. 2) Simply scrolling the portal And also many Script Steps would temporary lock the record, of course this usualy don't create problems and the good programing practice (and the one that will improve visibily system performances) is to lock the record yourself, by placing cursor in some of the fields using step go to field, before starting an sequence of steps that would lock/unlock the record every time performed, like setting different fields one after other. Dj
Recommended Posts
This topic is 8048 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now