Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Current »

Content Freeze

As of July 25th, 2023, there is a content freeze on this page.

The following example reads records from a table 50 rows at a time into a primitive JavaScript object:

var c1 = pjs.allocStmt();
c1.executeDirect("SELECT prid, prname, prdesc FROM demolib/productsp ORDER BY prid");

if (sqlstate == '00000') {

  while (c1.hasMoreRows()) {
    var records = c1.fetch(50);
    for (var i = 0; i < c1.rowCount(); i++) {
      var record = records[i];
      console.log(record);
    }
  }

}

c1.close();
  • No labels