title: Connection Class to connect Oracle DB with Android Studio Project
body: <p>I used to connect my Android Studio to Microsoft SQL server using this code.</p>
  
  <pre><code>    public class ConnectionClass
      {
      String ip = "192.168.1.4";
      String classs = "net.sourceforge.jtds.jdbc.Driver";
      String db = "BlackForestProd";
      String un = "sa";
      String password = "P@ss123";
  
  @SuppressLint("NewApi")
  public Connection CONN()
  {
      StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
      StrictMode.setThreadPolicy(policy);
      Connection conn = null;
      String ConnURL = null;
      try
      {
          Class.forName(classs);
          ConnURL = "jdbc:jtds:sqlserver://" + ip + ";" + "databaseName=" + db + ";user=" + un + ";password=" + password + ";";
          conn = DriverManager.getConnection(ConnURL);
      }
      catch (SQLException se)
      {
          Log.e("ERRO", se.getMessage());
      }
      catch (ClassNotFoundException e)
      {
          Log.e("ERRO", e.getMessage());
      }
      catch (Exception e)
      {
          Log.e("ERRO", e.getMessage());
      }
      return conn;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Used Connection class java file to get values from databases</p>
  
  <pre><code>    connectionClass = new ConnectionClass();
      Connection con = connectionClass.CONN();
                  if (con == null) {
                      z = "Error in connection with server";
                  } else {
                      Statement statement = con.createStatement();
                      rs = statement.executeQuery("select Name from tblAppcustomer where Mobile='" + userid + "'");
                      while (rs.next()) {
                          clientname = rs.getString("Name");
                      }
                  }
  </code></pre>
  
  <p>Similarly I have data in my Oracle Db that I want to use in my Android project. Is there a similar way to do it . Or is there any other way. Im a beginner with Android.</p>