Versions Compared

Key

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

...

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

...

Example
Code Block
languagejavascript
  SearchTerm = '%' + search + '%';
  Statement = 'SELECT * FROM PRODUCTSP ';
  Statement += 'WHERE ';
  Statement += 'UPPER(PRNAME) LIKE ? ';
  Statement += 'OR ';
  Statement += 'UPPER(PRDESC) LIKE ? ';
  Statement += 'OR ';
  Statement += 'UPPER(PRIMAGE) LIKE ? ';
  Statement += ' FOR FETCH ONLY';

  c1 = pjs.prepare(Statement);
  pjs.setStmtAttr(c1, SQL_ATTR_CURSOR_SCROLLABLE, SQL_TRUE);
  pjs.bindParameters(c1, [
    [SearchTerm, SQL_PARAM_INPUT],
    [SearchTerm, SQL_PARAM_INPUT],
    [SearchTerm, SQL_PARAM_INPUT]
  ]);

  pjs.execute(c1);


Requirements

This API requires the Profound.js Connector module.