public void connectionToDataBase() { try { TextView textViewWhere = (TextView) findViewById(R.id.dateStart); TextView textViewFrom = (TextView)findViewById(R.id.dateEnd); EditText editTextTickets = (EditText)findViewById(R.id.tickets); String userName = "1111"; String password = "1111"; String url = "jdbc:mysql://77.87.193.68/abcd"; Class.forName ("com.mysql.jdbc.Driver").newInstance (); conn = DriverManager.getConnection (url, userName, password); String insertDataIntoSQL = "INSERT INTO BUS_ORDER(pay_status, real_date_from, real_date_back)values('no', '" + textViewFrom.getText() +"', '" +textViewWhere.getText() +"')"; Statement statement = conn.createStatement(); statement.executeUpdate(insertDataIntoSQL); } catch (Exception e) { System.err.println ("Cannot connect to database server"); e.printStackTrace(); } finally { if(conn != null) { try{ conn.close(); } catch(Exception e) {} } } } public void Bronirovat(View v) { connectionToDataBase(); startActivity(new Intent(this, Tickets.class)); } I can not add data to the table, more precisely to the columns. What could be the problem? JDBC drivers were placed in the folder C: \ Program Files \ Java \ Jre1.8.0_77 \ lib \ ext. Nowhere else did I prescribe and did nothing.
<uses-permission android:name="android.permission.INTERNET" />registered inmanifest.xml? - no news