The pjs.connect() API creates a connection to a database.
*LOCAL"for IBM i ) is automatically initiated.
This API requires the Profound.js Connector module.
For IBM i connections:
- database name (18 characters max)
You can use "
*LOCAL" to connect to the local database.
- username (optional, 10 characters max)
Must be from a user profile. This username is used to connect to the database
- password (optional, 128 characters max)
Must be the password of the user profile being used to connect with the database.
For other database connections, the connection parameters must match the connection config format of the database driver's corresponding NPM package. If no parameters are specified, the default connectionDetails settings are used.
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.