Concurrency Operation in Progress 4GL

Status
Not open for further replies.
K

kevinwong

Guest
REPEAT With FRAME:

prompt-for IN-SCAN3.scan.
if input IN-SCAN3.scan="" then Do:
Message "please input date.".
undo,retry.
end.
else DO:
FIND FIRST in-scan3 USING IN-SCAN3.scan NO-LOCK NO-WAIT NO-ERROR.
if avail In-scan3 then DO:
str="OK".
display str.
next-prompt IN-SCAN3.scan.
end.
else DO:
CREATE In-scan3.
ASSIGN IN-scan3.scan=INPUT in-scan3.scan.

str="NO". DISPLAY str.
next-prompt In-scan3.scan.
END.
end.
begin=begin + 1.


end.

Question desc: There are 20 users using scanning at the same time,first find input data, if not found, then create one record in the database. The question is, at the same time operating will appear dead lock. I try NO-LOCK NO-WAIT with record when find,operating will appear dead lock when create a record.

thanks any answer.

Continue reading...
 
Status
Not open for further replies.
Top