Versions Compared

Key

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

...

  • You will only need to prepare a statement if you have markers in the WHERE clause within the statement. You can use pjs.executeDirect() otherwise.
  • You must connect to the database first.
Parameters
  1. SQL statement string.

Return Value

...

  • message - The IBM i message text.
  • error - The message id.
  • help - The message help text.
Example
Code Block
languagejavascript
pjs.connect("*LOCAL");
 
var _stm = pjs.prepare("SELECT * FROM PJSTEST/PRODUCTSP WHERE PRID like ?");