Thursday, 25 May 2017

Node into 2 statements into mssql with 1 route , Update and Insert into ms-sql

I have a Node app in which I insert into a table, however I now need to also insert into another table

problem is that I'm not understanding how to add a second promise execution

var query = "first query...";

var query2 = "new 2nd query...";

request.query(query).then(function(resultset){
    console.log('resultset node', resultset);
    res.json(resultset);

}).catch(function(err){
    console.log('err node', err);
    res.json(err)
})



via Jeremy Miller

No comments:

Post a Comment