SQL Server Returning Results Twice On A Single Call?
I have connected a SQL Server database to a simple node.js server. When I run the code I get both recordsets and recordset returned to me. They both essentially contain the same da
Solution 1:
This is the expected behaviour of mssql have a look at the documentation here. When you execute multiple statements it allows you to have multiple recordsets
You will notice that there is in fact 2 properties
recordset (singular) and recordsets (plural)
recordset (singular) refers to the first statement that is executed. In your case you can just use this
recordsets (plural) is an array of recordsets, in your case there will only be one in the array as you are only running one statement.
Post a Comment for "SQL Server Returning Results Twice On A Single Call?"