Hi Stephen,
>Hello Christopher
>
>Well this is a long argued thing with many opinions, this is mine (and I have incorperated it into a working program)
>
Yes, opinions abound. The trend is to us optimistic buffering, and avoid locking completely. But that doesn't answer the original question, does it? :)
>I add a charictor field (lockedby) to every table the maximum lenght of users last name plus the maximum lenght of users first name + 2 spaces
>so it can look like this
A more flexible approach would be as follows. It does not require any fields to be added to any tables. Create a table (call it rlocks, for example) that stores all information for locked records. In it, store the table name, the primary key value (works great with surrogate keys), the user, and perhaps a timestamp. Also, instead of storing the entire userName, you could have a users table (again, with surrogate keys). Store the userID of the user in the rlocks table.
This could easily be standarized with a few methods in a data class...rlock(), unlock(), querylock(), etc.
HTH,
Steve Gibson