I am trying to access a Ms Access 2007 db trough nodejs in Windows 7, but even this simple query won't work. I receive the following message in the command prompt (this is a translation, the original is in portuguese): "Operation not allowed when object is closed". Anybody have any answers? The javascript code is written below:
var ADODB = require('node-adodb');
var connection = ADODB.open('Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\teste\\dbteste.accdb;Persist Security Info=False;');
ADODB.debug = true;
connection
.query('SELECT * FROM [Tabela];')
.on('done', function (data){
console.log('Result:'.green.bold, data);
})
.on('fail', function (data){
});
Thanks!
Aucun commentaire:
Enregistrer un commentaire