Multiuser problem -
12-05-2003
, 09:17 AM
Hi all, i hope will not be a stupid question, anyway here is the
problem. More then 10 user are connected to an application written
with VB and using ADO.They have to select a records based on the
minimum value of a integer field and then set a flag on a boolean
field. Here is a code sample:
UPDATE tablename SET stato = true,user=username
WHERE id_call=(SELECT Min(id_call) FROM tablename HAVING
(((stato)=False) AND ((country)=id_country)
I made that query because i wanna be sure that only one user has set
that particular record...thinking that query will do in a atomic pass.
But, and here is the problem, sometimes users select the same record
and i don't know how! I checked all the whole procedure and if access
make query one after other in a kind of queue, and the query written
above is atomic, i don't understand where is the problem.
Thanks a lot to anybody will try to help me.
Sonet |