This API prepares a statement to execute.
You only need to prepare a statement if you have parameter markers, identified by ? (question mark) symbols, in the SQL. You may use pjs.executeDirect() otherwise.
- SQL statement string
- The SQL statement must be valid for the database you are using
This method will return a handle which much be used again in other statements.
SQL diagnostics are reported in the SQLCA:
SQLCA fields are defined in Profound.js programs with the names in lowercase. sqlcode will be set to zero if execution was successful.
When using an IBM i database, this API requires the Profound.js Connector module.