Answer the question
In order to leave comments, you need to log in
Why writes No suitable driver?
I just want to connect to the database through my android application, so the database is naturally located on the server
, here is the build.grable screen
try{
Connection conn=DriverManager.getConnection("jdbc:postgresql://ec2-34-m/df4rc37mr",
"lanza","5f9e089d28af90");
Statement st=conn.createStatement();
String GPS = "12";
Statement statement = null;
statement = conn.createStatement();
String SQL = "INSERT INTO gps_coordinat" + "(class) " + "VALUES" + "(" + location.getLatitude() + ")";
System.out.println("УСПЕХ");
statement.executeUpdate(SQL);
tvLocationGPS.setText("УСПЕХ");
}
catch (Exception e){
System.out.print(e);
tvLocationGPS.setText(e.getMessage());
Answer the question
In order to leave comments, you need to log in
Hello colleague!
If I'm not mistaken, then this is almost the 5th account from which you ask the same questions. One of your accounts has already been blocked by the administration.
My recommendations for you to learn the basics of programming, OOP, the basics of Java development, apparently, were also ignored.
Don't get me wrong, you should first learn the basics of programming, and then get into android development.
By the way, here are all your accounts from which you SPAM QnA.
https://qna.habr.com/user/Alik_Kolizeev
https://qna.habr.com/user/Java_Python
https://qna.habr.com/user/xxxfdd
https://qna.habr.com/user /new_year2021
https://qna.habr.com/user/timyr_murmur
Here. same questions from different accounts:
Why writes No suitable driver?
String SQL = "INSERT INTO gps_coordinat" + "(class) " + "VALUES" + "(" + location.getLatitude() + ")";
System.out.println("УСПЕХ");
String SQL = "INSERT INTO gps_coordinat (class)" + (GPS );
String SQL = "INSERT INTO gps_coordinat" + "(class) " + "VALUES" + "(" + location.getLatitude() + ")";
catch (Exception e){
System.out.print(e);
tvLocationGPS.setText(e);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question