• 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.

Show the SQL Statement when using Test RPG Call

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

  • Show the SQL Statement when using Test RPG Call

    Alot of times when making a call to the back end i'm just building a select sql statement and returning a set of records. The Test RPG call lets you see the records returned in JSon format, but it would be nice if you could actually see the sql statement that was ran also. I can't tell you how many times i've had to start a debug session just to find out the value of variable 'stmt' in my program so i could find out what was wrong with my sql statement. I believe this would be helpful. Thanks.

  • #2
    I'm not sure that this is something we will add in the near future, but some suggestions to help with your development:

    You could use vvOut.embed to include your SQL statements on your return if you would like.
    I have been using a PF with a very long record, and if I need to debug my sql, I will write a record with my statement just before executing it to the front end.

    Comment


    • #3
      Another option to consider, provided you're using 3.2, is to log your sql statements by insterting a simple vvUtility statement just prior to vvOut:
      Code:
      vvUtility_Log(vvLogFile:stmt);
      Additional info here.

      Comment

      Working...
      X