• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

unable to build/save Json string

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • unable to build/save Json string

    have application where I am trying to save the rows from an grid. I have done this in other applications and it works in those programs but this is the first time using the new BTNNAB and it is not creating the string correctly. I have a pointer called lObject. What could I be doing wrong? Below are the details.


    This is the variable.

    p2.png


    These are the Json instructions to build the string that will be saved as a session variable.

    p3.png

    Here is the instruction to save the string as a session variable.

    p4.png



    This the result of the session variable after doing all the instructions.


    p1.png



  • #2
    vvJson_XXX and vvUtility_saveSessVar procedures have not changed. I assume there is more related code to this?

    Comment


    • #3
      Sean, here is the source code. I have compared line by line to the other programs that is working and can't seem to find anything different.

      Attached document (1).PDF

      Comment


      • #4
        I don't see anything out of the ordinary. As a test, what happens if you hard code the 3rd parameter on each call to vvJson_putString?

        Comment


        • #5
          So I changed the first 4 puts and hard coded values and this time it did write out the string but none of the 4 putstring has a value but the other putstrings that are coded with a field did write out the value. BDACCT has value "CASH".


          Here is where I change the first 4 fields and hard coded values. But at least it wrote out the full string.

          p2.png

          Here is the session variable.


          p1.png

          Comment


          • #6
            So I went back and put all the field names back and tried it again and now the string is being written correctly. Have no idea why it is working now, but it is.

            Thanks again for all your help.

            Comment


            • #7
              Maybe it just needed to be recompiled from the beginning?

              Comment


              • #8
                I had recompiled it several times. It seemed to start working when I logged on to a new session. Maybe that was the issue. Just strange, but all is working correctly.

                Comment

                Working...
                X