I am using node-sql. recordSet is undefined when i try to insert record in a table using Prepare Statement. Below is the sample line of code.
ps.execute(data, function (err, recordSet, affected) { });
Although record is successfully inserted into database but it gives me undefined variable in callback function.
Yes i found an answer, We need to specify records to be returned using the OUTPUT clause. Like:
INSERT INTO Table OUTPUT.Id VALUES(...);