Accessing .mdb files through nodejs

后端 未结 3 1074
终归单人心
终归单人心 2020-12-13 02:27

I want to Access .mdb files and manipulate like insert / update using nodejs

Please suggest a library that would suite the need.

Thanks.

3条回答
  •  -上瘾入骨i
    2020-12-13 03:20

    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);
        })
    

提交回复
热议问题