Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void updateClient(String id,String nimi,String osoite, String puhelin, String email) {
- try{
- Class.forName("com.mysql.jdbc.Driver");
- Connection con=DriverManager.getConnection(
- "jdbc:mysql://localhost:3306/yhteystiedot","root","");
- //here sonoo is database name, root is username and password
- Statement stmt=con.createStatement();
- stmt.executeUpdate("UPDATE asiakas SET nimi='" + nimi + "', osoite='"
- + osoite + "',puhelinnumero='" + puhelin + "',email='" + email + "'" +
- " WHERE asiakasid=" + id);
- con.close();
- }catch(Exception e){}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement