...
Code Block | ||
---|---|---|
| ||
pjs.connect("*LOCAL"); var c1 = pjs.allocStmt(); pjs.executeDirect(c1, "select prid, prname, prdesc from demolib/productsp order by prid", "c1"); var obj; if (SQLSTATE == '00000') { while (!pjs.isLastRowhasMoreRows(c1)) { obj = pjs.fetch(c1, 50); for (var i = 0; i < pjs.rowCount(c1); i++) { console.log(obj[i]); } } } pjs.close(c1); pjs.disconnect() |