By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,397 Members | 1,425 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,397 IT Pros & Developers. It's quick & easy.

Cannot Lock a Table via ADO

P: n/a
Greetings All

Environment is Access 2000, multi-user application with back end
Access MDB on the server.

I lock my Counters table while retrieving the next unique counter with
the following code:

rst.Open "tblCounters", CurrentProject.Connection, adOpenKeyset,

lngNextCounter = rst(pstrCounterName)
rst(pstrCounterName) = lngNextCounter + 1 'xxx

However, if I pause code operation on the line marked xxx on one
client, then run the code on a second client, I get the same Counter
returned on both clients. So that this code is obviously not locking
the table, even with pessimistic locking. (The table contains only
one record.)

Is there any way for the first client to lock the table to avoid any
protential conflicts?

Nov 12 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.