Click here to Skip to main content
15,937,602 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello all!
I'm a niewbie in node.js.
I have a mssql procedure(
) with 2 parameters .
It runs well but i can't get the output this procedure returns.

 async kdar_emp_eidos1(prod) {
   const conn = await mssqlcon.getConnection();
   const res = await conn.request()
   .input("customer_code", prod.customer)
   .input("item", prod.item)
   return res;


When i run it in postman i get
    "recordsets": [
    "recordset": [],
    "output": {},
    "rowsAffected": [
    "returnValue": 0

and in console empty recordsets
[ [] ]
[ [] ]
Can you help me get the recordset right?

What I have tried:

I have try to res.send(recordset);
for (var i = 0; i < recordset.recordsets[0].length; i++)
but i get the same results.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900