title: using tedious connection,need to get the total data
body: <p>hai I am new to tedious and Es-6,It may be a silly question but I am struggling,
  I want  the total data in a array, using tedious connections here is my code:</p>
  
  <pre class="lang-jsx prettyprint-override"><code> getZipData() {
          var Connection = require('tedious').Connection;
          Request = require('tedious').Request;
          var config = {
              userName: 'xx',
              password: 'xxxx',
              server: 'xxx', // You can use 'localhost\\instance' to connect to named instance
              options: {
                  database: 'xxxxx',
                  rowCollectionOnDone:'true'
              }
          }
          var connection = new Connection(config);
          var jsonArray = [];
          connection.on('connect', function (err) {
              if (err) {
                  console.log(err)
              }
  
              var sql = "SELECT * FROM xxxxx";
              return new Promise(function(resolve,reject){
              var request = new Request(sql,
                  (err, rowCount, rows)=&gt;{
                      if (err) {
                          reject(err);
                      }
                      else {
                          alert("rows");
                          console.log(rowCount + 'rows');
                      }
                  });
                  request.on('row', (columns)=&gt;{
                          var rowObject = {};
                          columns.forEach((column)=&gt; {
                              rowObject[column.metadata.colName] = column.value;
                          });
                          jsonArray.push(rowObject);
                      });
                  connection.execSql(request);
                  request.on('done', function(rowCount, more) {
                      console.log(rowCount + ' rows returned');
                      alert("jsonArray2:"+jsonArray);
                      resolve(jsonArray)
                  });
  
              });
      })
  }
  componentWillMount() {
      this.getZipData().then(function(resolved){
          console.log(resolved);
          alert("data:"+resolved);
      }).catch(function(rejected){
          console.log(rejected);
      })
  }
  </code></pre>
  
  <p>when i add the  request.on('done', function(rowCount, more)  also i didn't get any data can any one give the solution for it,
  I want the total data to be displayed</p>