Versions Compared

Key

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

...

  1. Non-prepared handle (from pjs.allocStmt()). This parameter can be omitted if the API is called as a statement method.
  2. SQL statement string
    1. The SQL statement must be valid for the database you are using

Return Value

This method will return a handle which must be used again in other statements.

...

Code Block
languagejavascript
titleCalled as a method
c1 = pjs.allocStmt();
c1.setStmtAttr(SQL_ATTR_CURSOR_SCROLLABLE, SQL_TRUE);

c1.executeDirect("SELECT prid FROM demolib/productsp ORDER BY prid");
pjs.fetchLast(c1, prid);
 
c1.close();


Requirements

This When using an IBM i database, this API requires the Profound.js Connector module.