title: Can Google App Maker connect to MS SqlServer Database in Azure?
body: <p>thanks for reading. I have added the App Maker APIs to the Azure firewall as described <a href="https://developers.google.com/apps-script/guides/jdbc" rel="nofollow noreferrer">here</a> I have tried connecting from App Maker to the sqlserver database on azure several ways, and I have triple checked my username and password and used it to connect directly to the database in other applications. </p>
  
  <p>Here are some things I have tried:</p>
  
  <pre><code>var dbUrl = 'jdbc:sqlserver://mydatabase.database.windows.net:1433/mydatabase';
  var user = 'myusername';
  var userPwd = 'mypassword';
  
  function getJDBCConnection() {
    try {
      return Jdbc.getConnection(dbUrl, user, userPwd);
    } catch (err) {
      if (err.message.match(/Failed to establish a database connection/)) {
        throw new Error(err.message + ' Please refer to the ReadMe and edit ' +
                        'your database settings!');
      } else {
        throw err;
      }
    }
  }
  </code></pre>
  
  <p>and I have also tried creating the connection directly with two methods, first:</p>
  
  <pre><code>    var conn = Jdbc.getConnection('jdbc:sqlserver://mydatabase.database.windows.net:1433/mydatabase','username', 'password');
  </code></pre>
  
  <p>and also like this</p>
  
  <pre><code>    var conn = Jdbc.getConnection('jdbc:sqlserver://mydatabase.database.windows.net:1433/mydatabase', {user: 'username', password: 'password'});
  </code></pre>
  
  <p>any advice is greatly appreciated.</p>