Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try{
- conn=DriverManager.getConnection("jdbc:mysql://localhost/muzica","root","parola123");
- stmt=conn.createStatement();
- stmt.execute("truncate melodii;");
- }catch(SQLException sqle){
- sqle.printStackTrace();
- }
- for(String a:melodii.keySet()){
- try{
- stmt.execute("insert into melodii values (null,'"+a+"','"+melodii.get(a)+"');");
- }catch(SQLException sqle1){
- sqle1.printStackTrace();
- }
- System.out.println("Numele melodiei este: "+a);
- System.out.println("Path-ul melodiei este: "+melodii.get(a));
- System.out.println("---------------------------------------------");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement