Windows 10 install error self.odbc = (options.odbc) ? options.odbc : ((ENV) ? ENV : new odbc.ODBC())

148 views
Skip to first unread message

Craig Wilson

unread,
May 9, 2017, 1:54:46 AM5/9/17
to node-ibm_db
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?

bimaljha

unread,
May 10, 2017, 12:55:08 AM5/10/17
to node-ibm_db
This is user permission related issue. See the fix here: https://github.com/ibmdb/node-ibm_db/issues/168#issuecomment-300155925

Thanks and Regards,
Bimal Jha
Reply all
Reply to author
Forward
0 new messages