Multi-user access problem

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top