So the title may not be the most helpful.. but I am using Microsoft Azure to call a stored procedure
mssql.query("EXEC allInfo ?", [meetingID],
{
success: function(results1) {
console.log(results1);
var endOutput2 = request.body.meetingName;
response.send(statusCodes.OK, endOutput2 );
},
error: function(err) {
console.log("error is: " + err);
response.send(statusCodes.OK, { message : err });
}
});
I know the line
var endOutput2 = request.body.meetingName;
is not correct. I am trying to get the result from executing the stored procedure allInfo. How can I get the data so I can parse it and use it later in the project. The stored procedure is below.
BEGIN
SELECT * FROM ScheduleMe.main_Meeting
WHERE meetingID = @meetingID;
SELECT * FROM ScheduleMe.date_Time
WHERE meetingID = @meetingID;
END
I can get it to output like this(below) but I cannot then just grab meetingName or other variables.
[{"meetingID":"899c-64b7-fa94","meetingName":"Test 1","meetingDescription":"test","meetingLength":30,"meetingNotes":null,"hostUserID":"[email protected]"}]