1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

  2. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

Concurrency Operation in Progress 4GL

Discussão em 'StackOverflow' iniciado por fdantas, Dezembro 17, 2014.

  1. fdantas

    fdantas Administrator Moderador

    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...

Compartilhe esta Página