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 Version History

Version 1 Next »

Bind parameters to a prepared statement.

  • Before using this method, you must use pjs.prepare() and pass in the handle from that call.
Parameters
  1. The handle which is created from pjs.prepare().
  2. An array which has an array. Each element in the array must be another array, where the first element is the value of the parameter and the second is what parameter type it is.
    • [[paramA, profound.SQL_PARAM_INPUT], [paramB, profound.SQL_PARAM_INPUT]]

      For each marker, there must be another element in the top array.

Return Value

None.

Exception Handling

If there is a problem creating the data area, an Error will be thrown with the following properties:

  • message - The IBM i message text.
  • error - The message id.
  • help - The message help text.
Examples
pjs.connect("*LOCAL");  
var _stm = pjs.prepare("SELECT * FROM PJSTEST/PRODUCTSP WHERE PRID = ?");
pjs.bindParameters(_stm, [
  [gPrid, pjs.SQL_PARAM_INPUT]
]);
  • No labels