JsonObject strange behaviour

Posted by goo on 07-Feb-2017 07:38

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  

Posted by Robin Brown on 07-Feb-2017 12:15

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

Posted by Tim Kuehn on 07-Feb-2017 07:58

Is wdActivityWinprocess a TT or DB table?

Posted by goo on 07-Feb-2017 08:16

It is a DB table...

Posted by Robin Brown on 07-Feb-2017 12:15

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.  

Posted by goo on 07-Feb-2017 12:54

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.

This thread is closed