PC Review


Reply
Thread Tools Rate Thread

Exclusive lock?

 
 
mscertified
Guest
Posts: n/a
 
      28th Jan 2008
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
 
Reply With Quote
 
 
 
 
Marshall Barton
Guest
Posts: n/a
 
      28th Jan 2008
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]
 
Reply With Quote
 
 
 
 
JohnC
Guest
Posts: n/a
 
      29th Jan 2008
Are you wanting to lock the database because you are performing perhaps a
make table query to update data?

If so, I have found it more gentle to perform a delete query followed by an
append query.

John

"mscertified" <(E-Mail Removed)> wrote in message
news:204BDB0C-6946-446F-9D34-(E-Mail Removed)...
>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



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Open DB with Open/Read only/Open exclusive/Open exclusive read onl =?Utf-8?B?TWFrZUxlaQ==?= Microsoft Access VBA Modules 0 5th Jun 2007 12:59 PM
Remote Desktop Connection - exclusive login. Joe Letter Windows XP Help 6 16th Dec 2004 08:40 PM
Exclusive process before login/welcomoe screen Tobias Hertkorn Windows XP Help 3 5th Oct 2004 06:46 AM
Exclusive control over the registry........... Colleen Windows XP Security 0 14th Jun 2004 06:47 PM
Norton Disk DR..Exclusive rights???? christine Windows XP Security 1 3rd May 2004 12:42 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:07 AM.