A
Art
I am trying to update a records in a recordset and as I loop through the
records, I want to check whether the record has been locked by another user,
using pessimistic locking.
In another instance of the database, I edit the record, but do not save ---
then I run this code. It's supposed to raise an error on the update
statment, but does not. Any thoughts?
set db = currentdb
set rs = db.openrecordset ("table1")
do until rs.eof
on error goto handle_error
rs.lockedits = true
rs.edit
rs!field1 = "test"
rs.update
nrecord:
rs.movenext
loop
handler_error:
x = x + 1
resume nrecord
Thanks in advance for your help
records, I want to check whether the record has been locked by another user,
using pessimistic locking.
In another instance of the database, I edit the record, but do not save ---
then I run this code. It's supposed to raise an error on the update
statment, but does not. Any thoughts?
set db = currentdb
set rs = db.openrecordset ("table1")
do until rs.eof
on error goto handle_error
rs.lockedits = true
rs.edit
rs!field1 = "test"
rs.update
nrecord:
rs.movenext
loop
handler_error:
x = x + 1
resume nrecord
Thanks in advance for your help