-
Notifications
You must be signed in to change notification settings - Fork 475
Closed
Description
'use strict';
let config = {
user: sql_user,
password: sql_psw,
server: sql_server,
database: sql_database
}
let sql = require('mssql');
let query = 'select * from t1';
let connection = new sql.Connection(config)
connection.connect()
.then((conn) => {
return new sql.Request(conn)
.query(query)
.then(function (data) {
// ...
})
})
.catch((err) => {
console.log(err);
});
Node 7.7.1 work fine. Node 7.7.2 throw error:
TypeError: "listener" argument must be a function
at Socket.once (events.js:307:11)
at Socket.connect (net.js:943:10)
at Connection.connectOnPort (\node_modules\tedious\lib\connection.js:429:19)
at \node_modules\tedious\lib\connection.js:411:27
at Socket.onMessage (\node_modules\tedious\lib\instance-lookup.js:28:14)
at emitTwo (events.js:106:13)
at Socket.emit (events.js:194:7)
at UDP.onMessage [as onmessage] (dgram.js:546:8)
I thing, this error caused by b56e851c48 commit.
notxt and kedoska