node-adodb icon indicating copy to clipboard operation
node-adodb copied to clipboard

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

Open MartinLecat opened this issue 2 years ago • 5 comments

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 ?

MartinLecat avatar Jun 29 '22 09:06 MartinLecat

I have the same issue.

idodidodi avatar Aug 06 '22 13:08 idodidodi

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

idodidodi avatar Aug 06 '22 14:08 idodidodi

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.

robinmattern avatar Oct 16 '23 19:10 robinmattern

same issue, did you find a solution?

nadabsn avatar Nov 29 '23 15:11 nadabsn

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

MartinLecat avatar Dec 12 '23 16:12 MartinLecat