My connection java file contains :
try {
Log.i("Login", "Establishing Connection...");
// SET CONNECTIONSTRING
Class.forName("net.sourceforge.jtds.jdbc.Driver").newInstance();
Log.i("JDBC","found");
Connection DbConn = DriverManager.getConnection("<connection_string>");
Log.i("Login","Connected");
Statement stmt = DbConn.createStatement();
ResultSet insert = stmt.executeQuery("insert into UserLogin(username, password) values (admin, admin);");
ResultSet reset = stmt.executeQuery(" select * from UserLogin ");
Toast.makeText(this, reset.getString(1), Toast.LENGTH_SHORT).show();
DbConn.close();
// go to newsfeed
} catch (Exception e) {
Log.e("Error connection","" + e.getMessage());
}
When my connection string contains:
jdbc:jtds:sqlserver://, I gets error in connection :null,and when it's
jdbc:sqlserver://, I gets error in connection:no suitable driver found.
I'm trying to connect Android with Azure SQL DB.
I've seen Question1, Question2, Question3, Question4. No Answer.