...
See the IBM i SQL CLI documentation for a list of attributes and their values.
Exception Handling
An Error instance will be thrown with the following properties:
...
SQL diagnostics are reported in the SQLCA:
https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_73/db2/rbafzfielddescsqlca.htm
SQLCA fields are defined in Profound.js programs with the names in lowercase. sqlcode will be set to zero if execution was successful.
Example
Code Block | ||
---|---|---|
| ||
pjs.connect("*LOCAL"); //Use SQL naming convention pjs.setConnectAttr(SQL_ATTR_DBC_SYS_NAMING, SQL_FALSE); var c1 = pjs.allocStmt(); pjs.executeDirect(c1, "select prid from demolib.productsp order by prid"); pjs.fetchLast(c1, prid); pjs.close(c1); pjs.disconnect(); |
...