I'm trying to connect SQL Server on my local machine and get some data back.
Here's my code:
var sql = require("seriate");
var config = {
"host":"127.0.0.1",
"port": "1433",
"user": "dba",
"password": "test1234",
"database": "TheWorldDB"
};
sql.setDefaultConfig(config);
sql.execute({
query: "SELECT * FROM dbo.Trip"
}).then(function (results) {
console.log(results);
}, function (err) {
console.log("Something bad happened:", err);
});
And I get following error message:
SqlContext Error. Failed on step "result" with: "No connection is specified for that request."
code: 'ENOCONN'
I checked the DB table, password, query etc. Everything is correct, not sure why it's not connecting, There's little information I can find on line as well. Any advice will be appreciated.