Not able to connect to database if the version is "mssql": "^6.2.0" and able to connect if the version is "mssql": "^4.2.2" .
Not able to connect to database if the version is "mssql": "^6.2.0" and able to connect if the version is "mssql": "^4.2.2" . I want to update the drivers as we are getting dead locks .
Expected behaviour:
expected to connect to the Database using the new version 6.2.0.
Actual behaviour:
when I try to execute the code : node index.js there is no output , just it stops abruptly and return to the command prompt
Configuration:
`var sql = require("mssql/msnodesqlv8");
var sqlConfig = { server: 'servername', database: 'DBname', options: { "trustedConnection": true } };
(async function () { try { console.log("sql connecting......") let pool = await sql.connect(sqlConfig) let result = await pool.request() .query('SELECT TOP (1000) [sid] FROM DBname console.log(result)
} catch (err) {
console.log(err);
}
})()`
Software versions
- NodeJS: 10.2.1
- node-mssql: 6.2.0
- SQL Server:
Microsoft SQL Server 2017 (RTM-GDR) (KB4505224) - 14.0.2027.2 (X64) Jun 15 2019 00:26:19 Copyright (C) 2017 Microsoft Corporation Express Edition (64-bit) on Windows Server 2012 R2 Standard 6.3
(Build 9600: ) (Hypervisor)
changed the node version from 10.2.1 to 10.15.1 , then node was able to connect to Database . I guess Node 10.2.1 does not work with package .