Monday, 15 May 2017

Issue connecting to ODBC with NodeJs and node-adodb module

I am trying to create an application to connect to an ODBC.

I have a data source set up in ODBC Data Source Administrator 64 Bit.

I have 64 bit version of nodejs installed and i have a simple sample connection code from the node-adodb npm page.

However when I run the app I get an error:

The specified DSN contains an architecture mismatch between the Driver and Application

I'm trying to figure this out, but Im not sure why I am getting this error if the Driver is the ODBC Data source and the Appliation is my app and both of those are 64bit.

Is there something else that I am missing here?

The code I am using in my app.js:

var ADODB = require("node-adodb");
process.env.DEBUG = 'ADODB';


var connection = ADODB.open('cms');

connection
  .query('SELECT first 10 * FROM dsplit')
  .on('done', function(data) {
    console.log('result:', JSON.stringify(data, null, '  '));
  })
  .on('fail', function(error) {
    console.log(error);
  });

Thank you,

Barry



via Barry Thomas

No comments:

Post a Comment