nuintun / node-adodb

A node.js javascript client implementing the ADODB protocol on windows.
https://nuintun.github.io/node-adodb
MIT License
185 stars 51 forks source link

Error: Spawn C:\WINDOWS\SysWOW64\cscript.exe error #466

Open MartinLecat opened 2 years ago

MartinLecat commented 2 years ago

I have the current code:

const ADODB = require("node-adodb");
const conn = ADODB.open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=test.mdb;");
conn
    .execute("SELECT * FROM Table1")
    .then(d => {
        console.log(d, JSON.stringify(d));
    })
    .catch(e => {
        console.log(e, JSON.stringify(e));
    });

(ETA: I also changed Data Source to have the absolute path, with escaped \)

And a mdb file (Created with Office365 Access) Access 2002-2003:

id nom
1 nom1
2 nom2

I get the following error:

Error: Spawn C:\WINDOWS\SysWOW64\cscript.exe error
    at ChildProcess.<anonymous> (C:\Users\MLZH3502\Desktop\Sandbox\node_modules\node-adodb\lib\spawn.js:120:37)
    at ChildProcess.emit (node:events:526:28)
    at maybeClose (node:internal/child_process:1092:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) {
  exitMessage: 'Uncaught Fatal Exception',
  exitCode: 1
} {"exitMessage":"Uncaught Fatal Exception","exitCode":1}

I know it is a common issue, but I tried solutions given by #85 and #78 and it didn't work.

Do you have an idea ?

idodidodi commented 2 years ago

I have the same issue.

idodidodi commented 2 years ago

Try https://github.com/nuintun/node-adodb/issues/85#issuecomment-1207226254

Try changing the provider: Provider=Microsoft.ACE.OLEDB.12.0

To:

Provider=Microsoft.Jet.OLEDB.4.0

robinmattern commented 11 months ago

Using the OLEDB.12.0 I got an Invalid Provider error. Changing to OLDDB.4.0, I am now getting Invalid database format. I am running in a WIndows 10 PRO N 64bit VM without Access installed. I have downloaded and installed the 2016 Runtime and the 2016 Engine. The .accdb file was created with a current Office 365 version of Access in a 64 bit WIndows server.

Can you shed so light on what works with what???? What version of Access should I create the .accdb with and what version of the Runtime and the Engine should I use, that works with which OLEDB provider and your node-adodb module.

BTW, it works fine on 32bit and 64bit versions of Windows with Office 365's version of the MS Access app.

Thanks for you guidance in the very frustrating experience trying to get the right combination to work.

nadabsn commented 9 months ago

same issue, did you find a solution?

MartinLecat commented 9 months ago

same issue, did you find a solution?

I did not. I used PHP on a remote server because the project specification changed.

Good luck on finding a solution tho