Advertisement
Guest User

Untitled

a guest
Aug 12th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.54 KB | None | 0 0
  1. class verfimdp{
  2.  
  3.             public void main(String[] args){
  4.  
  5.                 String pilote = "com.mysql.jdbc.Driver";
  6.  
  7.                 try{
  8.                     Class.forName(pilote);
  9.              
  10.                     Connection connexion = DriverManager.getConnection("jdbc:mysql://localhost/test","root","pass");
  11.              
  12.                     Statement instruction = connexion.createStatement();
  13.              
  14.                     ResultSet resultat = instruction.executeQuery("SELECT * FROM Mot de passe");
  15.                     while(resultat.next()){
  16.  
  17.                        
  18.                         //à rajouter
  19.  
  20.                     }
  21.                 }
  22.                 catch (Exception e){
  23.  
  24.                     System.out.println("echec pilote : "+e);
  25.                 }
  26.  
  27.                 }
  28.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement