mscertified wrote:
>I need some way to enforce an exclusive lock so I can perform an operation
>with all other users locked out until I am done. How can I do this in VB with
>Access?
>Essentially what I need to do is:-
>Test lock
>If in place, wait until released by other user
>Place lock
>Perform operation (read then delete row from table)
>Release lock
Do you want to lock the enire database? If so and you have
a separate mdb file, then you could use the OpenDatabase
method with the exclusive option.
Or do you want to lock just one table? In this case you
could open a recordset in exclusive mode. That might also
work if you just want to lock/delete a record. OTOH, why
not just delete the record and use error handling to detect
if the delete failed because another user was editing it?
--
Marsh
MVP [MS Access]
|