I have node v6.10.2 and npm 4.5.0 installed on Windows 10.
I have installed ibm_db and using the sample code on the npm ibm_db site, the following error returns:
ibm_db\lib\odbc.js:138
self.odbc = (options.odbc) ? options.odbc : ((ENV) ? ENV : new odbc.ODBC());
^
[object Object]
Code used:
var ibmdb = require('ibm_db');
ibmdb.open("DRIVER={DB2};DATABASE=SAMPLE;HOSTNAME=<hostname>;UID=<user>;PWD=<passwd>;PORT=50002;PROTOCOL=TCPIP", function (err,conn) {
if (err) return console.log(err);
conn.query('select 1 from sysibm.sysdummy1', function (err, data) {
if (err) console.log(err);
else console.log(data);
conn.close(function () {
console.log('done');
});
});
});
Where have I gone wrong?