If i run my code in node it works just fine, but i can't call the query() function if it runs in electron.
Is this a limitation of electron or am i missing something here?
I changed this line in engine.js because in Vue the env variables where not set correctly:
console.log(connection.query("SELECT * FROM MSysObjects WHERE Type=1 AND Flags=0"));
it spits out the following error:
log.js?1afd:24 [HMR] Waiting for update signal from WDS...
Home.vue?76f2:16 Promise
spawn.js?d1a4:87 Uncaught (in promise) TypeError: childProcess.spawn is not a function
at eval (webpack-internal:///./node_modules/node-adodb/lib/spawn.js:87)
at new Promise (<anonymous>)
at spawn (webpack-internal:///./node_modules/node-adodb/lib/spawn.js:74)
at Proxy.exec (webpack-internal:///./node_modules/node-adodb/lib/proxy.js:40)
at ADODB.query (webpack-internal:///./node_modules/node-adodb/index.js:64)
at VueComponent.created (webpack-internal:///./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/views/Home.vue?vue&type=script&lang=js&:17)
at invokeWithErrorHandling (webpack-internal:///./node_modules/vue/dist/vue.runtime.esm.js:1862)
at callHook (webpack-internal:///./node_modules/vue/dist/vue.runtime.esm.js:4229)
at VueComponent.Vue._init (webpack-internal:///./node_modules/vue/dist/vue.runtime.esm.js:5012)
at new VueComponent (webpack-internal:///./node_modules/vue/dist/vue.runtime.esm.js:5158)
If i run my code in node it works just fine, but i can't call the query() function if it runs in electron. Is this a limitation of electron or am i missing something here?
I changed this line in engine.js because in Vue the env variables where not set correctly:
I import and open the connection like this:
but when i call
it spits out the following error: