Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejavascript
  pjs.connect("*LOCAL");
 
  var c1 = pjs.allocStmt();
  pjs.executeDirect(c1, "select prid, prname, prdesc from demolib/productsp order by prid", "c1");

  if (SQLSTATE == '00000') {
    var obj = pjs.fetch(c1);
    
    while (SQLSTATE == '00000') {
      console.log(obj);
      obj = pjs.fetch(c1);
    }
  }

  pjs.close(c1);


  pjs.disconnect();