-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
I'm trying it out with a MS-SQL Server database exactly the way mentioned in the usage section (As a Node dependency).
Here's the error I'm getting:
{ Error: Cannot enqueue Query after invoking quit.
...
at FSReqWrap.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:53:3) code: 'PROTOCOL_ENQUEUE_AFTER_QUIT', fatal: false }
Here's my code:
describe('Test spec', function () {
it("DB test", () => {
let execsql = require('execsql'),
dbConfig = {
host: 'shared_sql_instance_path_from_aws',
port: 3306, // optional, default is 3306
user: 'master',
password: 'password'
},
sql = 'use someDb;',
sqlFile = 'mySql.sql';
execsql.config(dbConfig)
.exec(sql)
.execFile(sqlFile, function (err, results) {
if (err) throw err;
console.log(results);
})
.end();
});
});
Metadata
Metadata
Assignees
Labels
No labels