Discussion Locked

Find the user

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I would like to identify the user who has a specific table row locked from another user that initiates a SELECT ... WHERE ROWID = ... FOR UPDATE ON ... NOWAIT for that same row. Is it possible to determine who has that lock in this case?
The purpose is to find out if a table row is locked before another tries to update that row. There will be no one waiting on the currently locked row.

2 replies

by donq

This is not what you asked for but I believe it may be something you can use (assuming your Access back-end uses Optomistic Locking?).

These are placed in a Modules Declarations section - and usually eliminate such conflicts:

' Constants for MsgBox
Global Const MB_OK = 0
Global Const MB_CRITICALSTOP = 16
Global Const MB_BTN1DEFAULT = 0

' RETRY NETWORK ACCESS WHEN LOCKING CONFLICTS BLOCK ENTRY.
Global Const MAX_RETRIES = 3

Hope thus Helps and of course there is always CurrentUser().

This discussion is closed to new replies.