JsonObject strange behaviour - Forum - OpenEdge General - Progress Community

JsonObject strange behaviour

 Forum

JsonObject strange behaviour

This question is answered

USING Progress.Json.ObjectModel.*.

DEF VAR oObject AS CLASS JsonObject.
oObject = NEW JsonObject().
DEF VAR lc AS LONGCHAR NO-UNDO.

FIND FIRST wdActivityWinprocess NO-LOCK NO-ERROR.
oObject:READ(BUFFER wdActivityWinprocess:HANDLE,TRUE).

oObject:WRITE(lc).
MESSAGE STRING(lc)
    VIEW-AS ALERT-BOX INFO BUTTONS OK.

gives this result:

{
      "wdActivityWinProcessID": 254,
      "activityWinProcessStatusOK": false,
      "wdProcessID": 5,
      "activityWinProcessChecked": "2017-02-07T10:43:12.472",
      "activityWinProcessMessage": "Kjører ikke",
      "wdMachineProcessID": 0,
      "wdActivityWinProcessID": 254,
      "wdActivityWinProcessID": 254
    }

The strange thing is that I have deleted one field and added one extra field to the database, so it seems like it is showing wrong Fields in the result. The added field is not showned. I have deleted wdProcessEnvironmentID and added wdProcessMachineID to the table.

I am working on 11.6.2

//Geir Otto  

Verified Answer
  • The JsonObject:Read()  method is only valid on temp-table buffers as of 11.6.3 due to a bug fix.  That's the way it should have been at the start.  

All Replies
  • Is wdActivityWinprocess a TT or DB table?

  • It is a DB table...

  • The JsonObject:Read()  method is only valid on temp-table buffers as of 11.6.3 due to a bug fix.  That's the way it should have been at the start.  

  • Thanks for letting me know... I didn't know there was that big diff between DB buffer and TT buffer :-) now I know 

    Sendt fra min iPad

    Den 7. feb. 2017 kl. 19.18 skrev Robin Brown <bounce-rbrown@community.progress.com>:

    Update from Progress Community
    <4TW802GGFMVG-png_2D00_70x70x2-png>
    Robin Brown

    The JsonObject:Read()  method is only valid on temp-table buffers as of 11.6.3 due to a bug fix.  That's the way it should have been at the start.  

    View online

     

    You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

    Flag this post as spam/abuse.