nuintun/node-adodb

Query promise stuck - no error

oggy29 opened this issue · 0 comments

Hello,

I have been using node-adodb locally and it is working perfectly. I tried using in a Node.js app hosted on Microsoft Azure and can't seem to get it to work.

No error message is being displayed in the catch block.

The code:

 try {

           let fileName=path.join(process.cwd(),req.file.filename);
            const connection = ADODB.open(`Provider=Microsoft.Jet.OLEDB.4.0;Data Source=${fileName};`);
            console.log(connection);
            let data = await connection.query('SELECT * FROM [TableName]');
            console.log(data);

        } catch (e){
            console.error(e);
        }

The first console.log outputs:

  connection: 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\\home\\site\\wwwroot\\file.mdb;',
  proxy: 
   Proxy {
     engine: 'D:\\Windows\\SysWOW64\\cscript.exe',
     encoding: 'utf16le' } }

The second console.log never outputs, it seems to be stuck awaiting the promise. Any help would be appreciated. Thanks.