title: Can't connect to SQL Server with node.js?
body: <p>Today I was trying to build my first app with electron and for this I need to connect to a SQL Server instance.</p>
  
  <p>I got <code>mssql</code> (from npm) and wrote this block of code: </p>
  
  <pre><code>var sql = require("mssql");
  
  var dbConfig = {
              server: "SERVER7\\SLATCAT",
              database: "Slatcat",
              user: "slatcat",
              password: "Sl@tc@t2017",
              port: "65400"
  };
  
  function connect() {
       var conn = new sql.ConnectionPool(dbConfig);
       var req = new sql.Request(conn);
  
      conn.connect(function(err) {
          if(err) {
              console.log(err);
              return;
          }
          else {
              req.query("select * FROM tags_table",function(err, recordset) {
                  if(err) {
                      console.log(err);
                      return;
                  }
                  else {
                      console.log(recordset);
                  }
  
                  conn.close();
              });
          }
      });
  }
  </code></pre>
  
  <p>It throws this error:</p>
  
  <blockquote>
    <p>ConnectionError: Accesso non riuscito per l'utente 'slatcat'.  </p>
    
    <p>at Connection.tedious.once.err (C:\users\madalin.necula\node_modules\mssql\lib\tedious.js:216:17)<br>
    at Object.onceWrapper (events.js:293:19)<br>
    at emitOne (events.js:96:13)<br>
    at Connection.emit (events.js:191:7)<br>
    at Connection.processLogin7Response (C:\users\madalin.necula\node_modules\tedious\lib\connection.js:1091:16)
        at Connection.message (C:\users\madalin.necula\node_modules\tedious\lib\connection.js:1573:21)
        at Connection.dispatchEvent (C:\users\madalin.necula\node_modules\tedious\lib\connection.js:857:45)
        at MessageIO. (C:\users\madalin.necula\node_modules\tedious\lib\connection.js:751:18)
        at emitNone (events.js:86:13)
        at MessageIO.emit (events.js:188:7)</p>
  </blockquote>
  
  <p>I've tried to change the account psw but i can't figure out what's denying the connection. Is there anyone who can help me understand?!</p>
  
  <p>Thanks in advance</p>
  
  <hr>