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 7 Next »

Fetch the last record in the current table (by handle).

Parameters
  1. Handle. Handle must be executed with pjs.execute() or pjs.executeDirect() before being passed in.
  2. Each parameter after the first are the different fields that should be bound from the data from fetch.
  3. Optional - number of rows to fetch. Default is 1.


Exception Handling

An Error instance will be thrown with the following properties:

  • message - The IBM i message text.
  • error - The message id.
  • help - The message help text.

Example

c1 = pjs.allocStmt();
pjs.setStmtAttr(c1, SQL_ATTR_CURSOR_SCROLLABLE, SQL_TRUE);
 
pjs.executeDirect(c1, "select prid from demolib/productsp order by prid");
pjs.fetchLast(c1, prid);
 
pjs.close(c1);


Requirements

This API requires the Profound.js Connector module.

  • No labels