M
mscertified
Multiple users are reading from a table, each *must* get a different record
(or none found). I execute the below statement.
Test result two users read the same record.
strSQL = "UPDATE tblPortal SET LockUser = '" & strUser & "'" & _
" WHERE ID IN (SELECT TOP 1 ID FROM tblPortal" & _
" WHERE LockUser IS NULL ORDER BY TimeStamp, ID)"
CurrentProject.Connection.Execute strSQL, lngCnt
I attempt to prevent this by only updating records where the lock column is
null and then setting this column to the userid. Obviously it did not work.
Any ideas?
(or none found). I execute the below statement.
Test result two users read the same record.
strSQL = "UPDATE tblPortal SET LockUser = '" & strUser & "'" & _
" WHERE ID IN (SELECT TOP 1 ID FROM tblPortal" & _
" WHERE LockUser IS NULL ORDER BY TimeStamp, ID)"
CurrentProject.Connection.Execute strSQL, lngCnt
I attempt to prevent this by only updating records where the lock column is
null and then setting this column to the userid. Obviously it did not work.
Any ideas?