title: Can't connect to SQL Server from my VS Code extension (node.js)
body: <p>I'm developing VS Code extension and want to get some data from SQL Server database. I've tried many different examples but non of them are working for me.</p>
  
  <pre><code>        const Connection = require('tedious').Connection;
  
          const config = {
              user: 'ssrs', // tried userName, username
              password: 'ssrs', 
              server: 'localhost',
              options: {
                  database: 'imdb' 
              }
            }
  
            const connection = new Connection(config);
            connection.on('connect', function(err: string) {
              if (err) {
                console.log(err);
              } else {
                console.log('Connected');
              }
            });
  </code></pre>
  
  <p>OR</p>
  
  <pre><code>        await sql.connect('mssql://ssrs:ssrs@localhost/imdb')
          const result = await sql.query`select 1 as one`
          console.dir(result)
  </code></pre>
  
  <p>OR</p>
  
  <pre><code>    const sql = require("mssql");
      const conn = new sql.ConnectionPool({
          database: "imdb",
          server: "localhost",
          driver: "msnodesqlv8",
          userName: "ssrs",
          password: "ssrs"
      });
  
      conn.connect().then(() =&gt; {
          console.log('Connected');
      });
  </code></pre>
  
  <blockquote>
    <p>ConnectionError: Login failed for user ''.</p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/X9APa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/X9APa.png" alt="enter image description here"></a></p>
  
  <p>Connecting via <code>sqlcmd</code>:</p>
  
  <p><a href="https://i.stack.imgur.com/XiJ3f.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XiJ3f.png" alt="enter image description here"></a></p>
  
  <p>The port is also open (1433) as I can telnet to it.</p>
  
  <p>Messages from SQL Server log:</p>
  
  <blockquote>
    <p>Date      2019-05-08 11:19:02 AM Log      SQL Server (Current - 2019-05-05
    2:53:00 PM)</p>
    
    <p>Source        Logon</p>
    
    <p>Message Login failed for user ''. Reason: An attempt to login using
    SQL authentication failed. Server is configured for Integrated
    authentication only. [CLIENT: 127.0.0.1]</p>
    
    <p>Date      2019-05-08 11:19:02 AM Log      SQL Server (Current - 2019-05-05
    2:53:00 PM)</p>
    
    <p>Source        Logon</p>
    
    <p>Message Error: 18456, Severity: 14, State: 58.</p>
  </blockquote>
  
  <p>Trying to connect with Powershell:</p>
  
  <pre><code>  PS C:\WINDOWS\system32&gt; Invoke-Sqlcmd -query "select CURRENT_USER, USER_NAME()" -ServerInstance "localhost" -username "ssrs" -password "ssrs" -Database 'imdb'
  
  Column1 Column2
  ------- -------
  ssrs    ssrs   
  </code></pre>