Search code examples
javascriptnode.jsnode-mssql

How to access the output parameter in node mssql?


`  request.input('xyz',sql.Int,1);
    request.input('abc',sql.Numeric,2);
    request.output('pqr',sql.Int);
    request.output('def',sql.Char);
      request.execute('[StoredProcedure]',function(err,recordsets,returnvalue){
      next.ifError(err);
      console.log(returnvalue);
    })`

Now the problem is how will i access the output parameters.

Regards.


Solution

  • request.parameters.pqr.value and request.parameters.def.value

    Got the answer , so sharing it :)