title: Connecting to SQL Server 2014 from Android Studio
body: <p>I have a problem connecting to SQL-server database through from my android project. I have added <strong>sqljdbc41.jar</strong> file to my /app/libs directory and I have added it to dependencies in my android studio project.</p>
  
  <p>I use following code:</p>
  
  <pre><code>package com.konrad.rezerwacje1;
  
  import java.sql.Connection;
  import java.sql.DriverManager;
  import java.sql.SQLException;
  import java.sql.Statement;
  
  
  
  public class Database_Console {
  
  public static void openConnection(){
      try {
          Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver"‌​);
          String url = "jbdc:sqlserver://127.0.0.1:1433;databaseName=my_db";
          Connection con = DriverManager.getConnection(url);
      } catch (SQLException e) {
          e.printStackTrace();
      } catch (ClassNotFoundException e) {
          e.printStackTrace();
      }
  }
  
  public static void main(String[] args){
      openConnection();
  }
  }
  </code></pre>
  
  <p>yet i still get this error</p>
  
  <pre><code>java.sql.SQLException: No suitable driver found for jbdc:sqlserver://127.0.0.1:1433;databaseName=my_db
      at java.sql.DriverManager.getConnection(DriverManager.java:689)
      at java.sql.DriverManager.getConnection(DriverManager.java:270)
  </code></pre>