Hello.
I have develope a procedure to do massive changes in data base. This is like that:
If in a iteration of a FOR EACH a record is locked for another user appear the message 2624 asking for cancel o wait.
If I press cancel , this launch a STOP condition and it start at the begining of the procedure and execute all FOR EACH another time. This is so because the block is the whole procedure, but If I include the ON STOP condition in the FOR EACH:
FOR EACH tribu.AccGenUsu WHERE tribu.AccGenUsu.UsuId <> '' AND tribu.AccGenUsu.UsuId <> ? EXCLUSIVE-LOCK ON STOP UNDO, RETRY:
tribu.AccGenUsu.UsuId = ttusuarios.usunew.
End.
Does this prevent that the procedure run another time from the begining?
I try it, but it does not behave like I expect.
What is it wrong?
Progress OE V10
Windows Systems
Thanks.
I have develope a procedure to do massive changes in data base. This is like that:
Code:
[SIZE=2]FOR EACH aljarafe.Permisos WHERE aljarafe.Permisos.UsrId <> '' AND aljarafe.Permisos.UsrId <> ? EXCLUSIVE-LOCK:
aljarafe.Permisos.UsrId = ttusuarios.usunew.
End.[/SIZE]
[SIZE=2]
FOR EACH tribu.AccGenUsu WHERE tribu.AccGenUsu.UsuId <> '' AND tribu.AccGenUsu.UsuId <> ? EXCLUSIVE-LOCK:
tribu.AccGenUsu.UsuId = ttusuarios.usunew.
End.
FOR EACH tribu.WebPermisos WHERE tribu.WebPermisos.Usuario <> '' AND tribu.WebPermisos.Usuario <> ? EXCLUSIVE-LOCK:
tribu.WebPermisos.Usuario = ttusuarios.usunew.
End.[/SIZE]
If in a iteration of a FOR EACH a record is locked for another user appear the message 2624 asking for cancel o wait.
If I press cancel , this launch a STOP condition and it start at the begining of the procedure and execute all FOR EACH another time. This is so because the block is the whole procedure, but If I include the ON STOP condition in the FOR EACH:
FOR EACH tribu.AccGenUsu WHERE tribu.AccGenUsu.UsuId <> '' AND tribu.AccGenUsu.UsuId <> ? EXCLUSIVE-LOCK ON STOP UNDO, RETRY:
tribu.AccGenUsu.UsuId = ttusuarios.usunew.
End.
Does this prevent that the procedure run another time from the begining?
I try it, but it does not behave like I expect.
What is it wrong?
Progress OE V10
Windows Systems
Thanks.