title: nodejs mssql return recordset
body: <p>Im trying to past the recordset from mssql request.query like a return value.
  Following the code on <a href="https://www.npmjs.com/package/mssql" rel="nofollow">https://www.npmjs.com/package/mssql</a> is easy to make a a console output but when I try to asign the recordset to another variable doesnt work. What Im doing wrong?
  <div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var sql = require('mssql');
  var config = {
      user: 'sa',
      password: 'XXXXXX',
      server: '192.168.8.25',
      database: '3TWIMDB',
  }
  var resultado='';
  sql.connect(config, function(err){
  var request = new sql.Request();
    request.query('select 1 as VehiCLASS',function(err,recordset){
      console.log(recordset[0].VehiCLASS);
      resultado = recordset[0].VehiCLASS;
    });
    sql.close();
  });
  console.log("rsul: "+resultado);</code></pre>
  </div>
  </div>
  </p>
  
  <p>Thanks.</p>