help with record locking

B

Bob Parr

I have a database that is being shared by several users. I want to lock a
row in a table when it is being edited. I have the "open databases with
record-level locking" option set, but when I test, opening the recordset
with:

Set currentrec = db.OpenRecordset(qstr, dbOpenDynaset, dbDenyWrite)
currentrec.LockEdits = True
or
Set currentrec = db.OpenRecordset(qstr, dbOpenDynaset, dbDenyWrite,
dbPessimistic)

the whole table is locked. I get an error 3262

Any ideas what I am doing wrong?

Bob
 
B

Bob Parr

I have a database that is being shared by several users. I want to lock a
row in a table when it is being edited. I have the "open databases with
record-level locking" option set, but when I test, opening the recordset
with:

Set currentrec = db.OpenRecordset(qstr, dbOpenDynaset, dbDenyWrite)
currentrec.LockEdits = True
or
Set currentrec = db.OpenRecordset(qstr, dbOpenDynaset, dbDenyWrite,
dbPessimistic)

the whole table is locked. I get an error 3262

Any ideas what I am doing wrong?

Bob
 
T

TC

I assume you have A2k+? (A97- do not have record-level locking.)

Surely dbDenyWrite is a recordset-level attribute? Would that not deny other
processes writing to any record shown in that recordset?

What are you actully trying to achieve?

HTH,
TC
(off for the day)
 
O

OzPete

Bob,

You might want to wait until all parts of the world wake up, in their own
particular time zones...

patience dear boy...

Pete
 

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