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

OpenEdge 4GL REST Service : computing temp table values creating errors

Discussão em 'StackOverflow' iniciado por fdantas, Janeiro 22, 2019.

  1. fdantas

    fdantas Administrator Moderador

    I have a progress 4gl rest webservice. The Create method accepts a dataset from which I extract its underlying temp table

    METHOD PUBLIC VOID Createprices(INPUT-OUTPUT DATASET dsprices):
    DEFINE VARIABLE hT AS HANDLE.
    ht = DATASET dsprices:GET-BUFFER-HANDLE(TEMP-TABLE ttprices:NAME).
    ht = ht:DEFAULT-BUFFER-HANDLE.
    PreTransactionValidate(INPUT-OUTPUT TABLE-HANDLE ht).


    I then pass the temp-table buffer to another method (pretransactionvalidate) where I compute the values for a couple of fields. The PretransactionValidate method with dummy values being assigned -

    METHOD PUBLIC VOID PreTransactionValidate( INPUT-OUTPUT table-handle ttprices):
    FOR EACH ttprices:
    ASSIGN
    ttprices.PricesId = NEXT-VALUE(SeqPricesId)
    ttprices.AddedDate = TODAY
    ttprices.AddedTime = TIME.
    END.


    Calling the PretransactionValidate method causes my Create Method to fail. If I comment out the call, I can successfully create a record. I'm a Progress newbie and can't find much material on the net, so any help would be worth trying.

    Cheers

    Continue reading...

Compartilhe esta Página