Requests can only be made in the logged in state, not the sentclientrequest state error comes only in loop, what’s solution for this?

...

var transaction = await new sql.Transaction(conn);
        
transaction.begin().then(async function () {
             
      var request = new sql.Request(transaction);

      async.eachSeries(cityLedgerSettlementAgainstRequset, async function(element){
                     
          request = new sql.Request(transaction);   
          request.input('date', sql.Date, date);
          request.input('ledgerId', sql.VarChar, element.LedgerId);
          await request.execute('PartyBalanceAdd');  

      });
});

...



Read more here: https://stackoverflow.com/questions/68474045/requests-can-only-be-made-in-the-logged-in-state-not-the-sentclientrequest-stat

Content Attribution

This content was originally published by Dhanuka Sheran at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: