How can I explicitly lock a certain record?

M

Morris

I've got this database split between back-end and front-end.

Back-end holds the table [Jobs] with all the jobs. Front-end holds an
empty table [EditedJob] with identical structure.

When the user clicks EditJob details of this job are copied to
[EditedJob] and I'd like this record to be locked, so that another
person wouldn't be able to enter edit mode of the same job.


Any ideas? I was thinking of adding another field to the table like a
Yes/No type field called 'Locked'. Which would be updated to TRUE once
the first user starts editing a job, but I was thinking is there some
built-in mechanism to achieve the same thing?

Thanks,
Morris
 
R

roger

There is an MSA internal record-locking system, but that has to do with
records that are actully opened by a user.

But in your case here, the backend table really isn't OPEN anymore. So yeah,
a bool field and manual locking seems to be a fine solution.

I wouldn't name the field "locked" though. (that might be "reserved word")
MyLock or RecInUse might be better.
hth
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top