Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
MartinLecat opened this issue Jun 29, 2022 · 6 comments
Open

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

MartinLecat opened this issue Jun 29, 2022 · 6 comments

Comments

@MartinLecat
Copy link

MartinLecat commented Jun 29, 2022

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
Copy link

I have the same issue.

@idodidodi
Copy link

Try #85 (comment)

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

To:

Provider=Microsoft.Jet.OLEDB.4.0

@robinmattern
Copy link

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
Copy link

nadabsn commented Nov 29, 2023

same issue, did you find a solution?

@MartinLecat
Copy link
Author

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

@z3sb
Copy link

z3sb commented Nov 5, 2024

The solution for this issue:

const connection = ADODB.open(
  `Provider=Microsoft.ACE.Oledb.12.0;Data Source=${dbPath};Persist Security Info=False;`,
  process.arch.includes("64")
);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants