Couldn't show the response in JSON while using a stored procedure.
I'm using express4-tedious to fetch results. It works fine if I use the select query but if I use the same with the stored procedure I don't know how to bind it in JSON.
The response screen is blank as I couldn't get the results.
var tediousExpress = require('express4-tedious');
var TYPES = require('tedious').TYPES;
var router = express.Router();
router.get('/:id', function (req, res) {
req.sql("exec GETDataOfEmployee @id")
.param('id', req.params.id, TYPES.VarChar)
.exec(res)
});
Any suggestions would be of great help.
Couldn't show the response in JSON while using a stored procedure.
I'm using express4-tedious to fetch results. It works fine if I use the select query but if I use the same with the stored procedure I don't know how to bind it in JSON.
The response screen is blank as I couldn't get the results.
Any suggestions would be of great help.