A
Ashish Chettri
Guest
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 = htEFAULT-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...
METHOD PUBLIC VOID Createprices(INPUT-OUTPUT DATASET dsprices):
DEFINE VARIABLE hT AS HANDLE.
ht = DATASET dsprices:GET-BUFFER-HANDLE(TEMP-TABLE ttprices:NAME).
ht = htEFAULT-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...