adodb
Version:
Package for executing SQL queries to MS Access databases intended for use on Windows XP and later. In the client-server mode, the client part can be used without restriction of the operating system.
22 lines (14 loc) • 470 B
JavaScript
;
const path = require('path');
const mdbPath = path.resolve(__dirname + '/test/media/Northwind2003.mdb');
const connStr = 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=' + mdbPath;
const ADODB = require('./index');
const pool = ADODB.createPool(connStr);
pool.query('SELECT * FROM Categories;', (err, data) => {
if (err) {
console.error(err.message);
} else {
console.log(data);
}
pool.end();
});