Record Locking for Editing.

N

New

Hi ,

I am new to Access. I am working on access forms as front end and my
Backend is Db2.

Right now two or more users can update the same record at same time .If one
user is updating a record and if second user tries to update same record i
want to show error message.

Please help in Record Locking for Editing.

Thanks in Advanse.
 
S

Sylvain Lafontaine

For what I know, Access don't support Pessimistic Record Locking for Editing
when the backend database is not the JET database engine (ie., when it's not
an MDB or ACCDB database file); so you cannot have or use this feature when
working against DB2, SQL-Server or Oracle.

What Access is supporting in these cases is Optimistic Record Locking: the
second user will see an error message but only when he tries to save the
record (and not be blocked directly at the beginning if he tries to edit a
record already opened for edition as it is the case with Pessimistic Record
Locking.).

--
Sylvain Lafontaine, ing.
MVP - Windows Live Platform
Email: sylvain2009 sylvainlafontaine com (fill the blanks, no spam please)
Independent consultant and remote programming for Access and SQL-Server
(French)
 
N

New

Hi Sylvain.

Thanks For the Reply.

After reading your post i tried to Implement Optimistic Record Locking.
I Have changed my Form data Property -> "Record Locks" to "Edited Record"

Now the second user is gettiing error message as "No Current Record" (Error
Number is 3021) when he tries to save the record .

1) Please let me know whether i am going in right direction.
2) How do i need to refresh the Current record for the second user after
seeing the error message.

Thanks In advanse.
 
S

Sylvain Lafontaine

Well, I don't have access to a DB2 database so you cannot make any test or
tell you anything more on this; I'm just telling you that you cannot expect
the same capabilities about record locking when you don't use JET as the
backend database.

If you want plan to use DB2, you should make sure that you won't have two
users trying to edit the same record at the same time; either by changing
the design of the database - for example by splitting a table into two or
more tables - or by implementing your own locking mecanism.

--
Sylvain Lafontaine, ing.
MVP - Windows Live Platform
Email: sylvain2009 sylvainlafontaine com (fill the blanks, no spam please)
Independent consultant and remote programming for Access and SQL-Server
(French)
 

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