Record lock

  • Thread starter Thread starter Luis
  • Start date Start date
L

Luis

Hello.
I have a Access 2K database that tat uses Oracle tables as
source of information. I have a form that users can
activate write permissions on a record. I'd like to know
if it's possible that when a user clicks on the activate
write permissions button, the first thing that the click
event does is check if the current record is locked by
another user.
Is this possible ?
 
Oracle does not "lock records" in the same way that many other databases do.

What are you actually trying to achieve?

TC
 
I have a form that allow many users to read the
information of the same record. In that form there's a
username password registration that allows the user to
alter data from that record. What i'm trying to do is to
prevent another user to registrate to alter data if the
current record is already opened to alter by another user.
In short words, when the user enters username and
password, the first thing that access does is to check if
the record that the user is trying to modify is already
being modyfied by another user.
 
Ok. I understand what you say. The only things that I can suggest, are
these.

(1) See if an Oracle SELECT FOR UPDATE statement on the row in question
would help. Two users can not SELECT FOR UPDATE the same row simultaneously.
Of course, this is Oracle SQL - not Jet SQL - so you'd have to do it as a
passthrough query (or whatever it's called).

(2) Maybe have the user add a record to your own locking table?

tblEditingRecord
RecordID (PK)
UserID

If a record is present in that table for RecordID 123 (for example), then,
the specified user is already editing that record, & all other users will
have to wait until that user has finished, & deleted his lock[ing record].

The problem with (2), is a common problem which always comes into play with
such schemes. What to do if a user adds a locking record, then fails with a
runtime error (or whatever), & the locking record is never removed?

HTH,
TC
 
Back
Top