Closed
Description
I am on a machine with node-mssql installed but also MSSMS. I can connect to a SQL Server (2000) using MSSMS (Microsoft SQL Server Management Studio), but when I use node-mssql to connect to the same SQL Server I don't get an error, but it doesn't connect either. This is my code:
var sql = require('mssql');
sql.connect({server: "ip", user: "user", password: "password"}, function(err) {
console.log('sql.connect error', err);
if (err) return callback(err);
var request = new sql.Request();
request.query(sql, callback);
});
The line console.log is never called and instead the node application throws an uncaught exception and is terminated:
TypeError: Uncaught, unspecified "error" event.
at TypeError (<anonymous>)
at Connection.EventEmitter.emit (events.js:74:15)
at Parser.<anonymous> (folder\node_modules\mssql\node_modules\tedious\lib\connection.js:490:15)
at Parser.EventEmitter.emit (events.js:95:17)
at Parser.nextToken (folder\node_modules\mssql\node_modules\tedious\lib\token\token-stream-parser.js:100:14)
at Parser.addBuffer (folder\node_modules\mssql\node_modules\tedious\lib\token\token-stream-parser.js:66:17)
at Connection.sendDataToTokenStreamParser (folder\node_modules\mssql\node_modules\tedious\lib\connection.js:675:35)
at Connection.STATE.SENT_LOGIN7_WITH_STANDARD_LOGIN.events.data (folder\node_modules\mssql\node_modules\tedious\lib\connection.js:146:23)
at Connection.dispatchEvent (folder\node_modules\mssql\node_modules\tedious\lib\connection.js:573:59)
at MessageIO.<anonymous> (folder\node_modules\mssql\node_modules\tedious\lib\connection.js:523:22)
When I connect with node-mssql using an ip address of another machine without mssql I get a nice ETIMEOUT, "Failed to connect to 10.101.0.11:1433 in 15000ms"
PS: I changed a lot of content in this issue since I originally wrote it 20 minutes ago!
Metadata
Metadata
Assignees
Labels
No labels