Skip to content

Error: Cannot enqueue query after invoking quit. #3

@akshayamaldhure

Description

@akshayamaldhure

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions