Info |
---|
Support for ODBC was added in Profound.js 5.3.0. |
...
An IBM account is required to access the downloads. Click on Downloads for IBM i Access Client Solutions, accept the license agreement, and use the ACS App Pkg link for the appropriate source operating system. For IBM i, use ACS PASE App Pkg. Installation instructions are included in each download package.
The IBM i version of the Application package installs via the open-source package manager "yum". See here for instructions on setting up yum on IBM i:
https://www.ibm.com/support/pages/node/706903
For Application Package installers for 32-bit Windows or languages other than English, visit the IBM ESS Website.
Configuration
Connections are configured using the databaseConnections property in the Profound.js configuration file. For example:
Code Block | ||
---|---|---|
| ||
"databaseConnections": [
{
"name": "myIBMi",
"driver": "odbc",
"type": "db2i",
"credentialsFile": `${__dirname}/credentials`,
"driverOptions": {
"connectionString": "DSN=myIBMi;dbq=,mylib,mylib2,mylib3;",
"initialSize": 10,
"maxSize": 10,
"shrink": false
}
}
] |
The database connections entry has the following properties:
- name (required): A name for the connection. The name can be whatever you choose, but must be unique.
- driver (required): Set to "odbc".
- type (required): The target database type. Can be any of "db2i", "mysql", "mssql", or "oracledb". However, this driver is primarily intended for use with DB2 for IBM i. For other databases, it's recommended to use the DB-specific drivers.
- credentialsFile: (optional): Path to a file containing an encrypted user id / password created by the "store_credentials" utility provided with Profound.js.
- driverOptions: (required): An object containing options for the odbc package's Pool constructor. See the NPM page for supported options. Profound.js's "odbc" driver only supports pooled connections. A pool is created for each databaseConnections entry.
To create a credentials file, run the following command from your Profound.js installation directory and enter the desired user id and password when prompted:
Code Block |
---|
node store_credentials.js |