Good day. There is a database, server MYSERVER on SQL Server 2012 Express, Windows authentification. Used by Node.JS tools for Visual Studio 2015.
Trying to connect from Node.JS:
var edge = require('edge'); var params = { connectionString: "Server=local\\MYSERVER;Database=mydb_2012;Integrated Security=True", source: "Select * from MyTable" } var getData = edge.func('sql', params); var obj, obj_; getData(null, function (error, result) { obj = error; obj_ = result; if (error) { console.log(error); return; } if (result) { console.log(result); } else { console.log("No results"); } }); In the end, nothing happens.
Tried another mssql, the same thing:
var sql = require("mssql"); var config = { driver: 'msnodesqlv8', server: 'localhost\\MYSERVER', database: 'mybase_2012', options: { trustedConnection: true, useUTC: true } }