Closed Aleyasen closed 6 years ago
The issue got fixed by these two changes:
index.js:148
callback(null, rows.map(function(row) {
to
callback(null, rows.recordset.map(function(row) {
and
index.js:196
results = results.map(function(col) {
to
results = results.recordset.map(function(col) {
What version of the mssql lib were you using? Might be helpful for others (I haven't used mssql on node myself).
I am using mssql@4.0.4
.
Thanks.
btw, I just found out the changes are documented in mssql 4.x release note: https://github.com/patriksimek/node-mssql#3x-to-4x-changes
I ran the code using this command:
but I got this error first:
I fixed it by changing
client = new db.Connection(mssqlDsn);
toclient = new db.ConnectionPool(mssqlDsn);
but after that I got this one:
Any thoughts are welcome.
my npm and node versions: