title: Requests can only be made in the LoggedIn state, not the SentClientRequest state
body: <p>I am trying to get data from database but getting following error { message: 'Requests can only be made in the LoggedIn state, not the SentClientRequest state',
    code: 'EINVALIDSTATE' }. If I call only one query function then it's working but not for multiple </p>
  
  <p>Below is my code</p>
  
  <pre><code>var connection = new Connection(config);
  connection.on('connect', function(err) {
  // If no error, then good to proceed.
  if(!err)
  {
      console.log("Connected");
      executeStatement();
      executeStatement2();
  }
  else
  {
      console.log(err);
  }
  });
  
  var Request = require('tedious').Request;
  var TYPES = require('tedious').TYPES;
  
  function executeStatement() {
  request = new Request("Select p.product_name, s.product_id, s.price,   s.create_date, s.update_date from products p left join sale s on (p.id = s.product_id) order by CONVERT(datetime, s.update_date ) desc ;", function(err) {
      if (err) {
          console.log(err);}
  });
  
  request.on('row', function(columns) {
          var rowObject ={};
          columns.forEach(function(column) {
              rowObject[column.metadata.colName] = column.value;
          });
          var jsonArray = [];
          jsonArray.push(rowObject);
  
  });
  
  connection.execSql(request);
  }
  
  
  function executeStatement2() {
  request = new Request("Select * from products ;", function(err) {
      if (err) {
          console.log(err);
      }
  });
  
  request.on('row', function(columns) {
      var rowObject ={};
      columns.forEach(function(column) {
          rowObject[column.metadata.colName] = column.value;
      });
      var jsonArray2 = [];
      jsonArray2.push(rowObject);
  
  });
   connection.execSql(request);
  }
  </code></pre>