node-adodb: Operation is not allowed
I keep getting an Error message stating “Operation is not allowed when the object is closed”. Any info on this error would be helpful.
var conn = ADODB.open('Provider=Microsoft.ACE.OLEDB.12.0;Data Source=SampleDB.accdb;Persist Security Info=False;');
conn.query('SELECT Control_Number FROM [orders]')
.on('done', function(data) {
console.log('done');
console.log(JSON.stringify(data));
})
.on('fail', function(data) {
});
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 19 (3 by maintainers)
It should be related to Provider issue, but the error message cannot be displayed due to connection closed in /lib/adodb.js#L489-490 , comment this two lines to view the error message.
since I had the same issue and try to install 32-bit version on Office 64-bit throws an error, I want to share how I installed 32-bit version of the engine: in cmd run the
AccessDatabaseEngine.exe /quietand all start to work. thanks for the help.I’m running Win server 2016, node-adodb@2.0.3. Installed the 64 bit version of “Microsoft Access Database Engine 2010 Redistributable”. After commenting the lines indicated by @inDream and @Spaarw I get the error "The specified provider could not be found. It may not be installed correctly. ".
The bug seems related to the bit version selection of cscript.exe.
The fix for me was to comment the lines 18, 19 in file “proxy.js”
and let the system select the cscript version adding the line
Thanks @nuintun. Your library is helpful for me.
I had the same issue, Thanks to @inDream ! In the last version, you have to comments these lines to display the real error message : /lib/adodb.js:496 -> //recordset.Close(); /lib/adodb.js/497 -> //connection.Close();