I want to Access .mdb files and manipulate like insert / update using nodejs
Please suggest a library that would suite the need.
Thanks.
Step 1: Launch MDB Viewer Software and click on the Open icon and select the MDB and click on OK. Step 2: Wait for the scanning process to get complete. Step 3: Choose the desired folder to preview the data. Step 4: For saving the whole data of MDB File click on the Upgrade button.
Node. js supports all kinds of databases no matter if it is a relational database or NoSQL database. However, NoSQL databases like MongoDb are the best fit with Node. js.
Slightly different but node-adodb worked well for me for .accdb files:
https://www.npmjs.org/package/node-adodb
// Get the adodb module var ADODB = require('node-adodb'); ADODB.debug = true; // Connect to the MS Access DB var connection = ADODB.open('Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\dbs\\my-access-db.accdb;Persist Security Info=False;'); // Query the DB connection .query('SELECT * FROM [TestTable];') .on('done', function (data){ console.log('Result:'.green.bold, data); })
This article describes the process for connecting PHP to an Access .mdb database: http://www.sitepoint.com/using-an-access-database-with-php/
The process for Node.js is quite similar - it's just another ODBC data source.
You'll need a node ODBC package, such as: https://github.com/wankdanker/node-odbc
https://github.com/markdirish/node-odbc/
Then you'll need to format your ODBC connection string. eg.
"DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=MyDatabase; Uid=; Pwd=;"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With