Guest User

Untitled

a guest
Jun 8th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.53 KB | None | 0 0
  1.     public void DeleteSong() throws Exception {
  2.         try {
  3.             // This will load the MySQL driver, each DB has its own driver
  4.             Class.forName("com.mysql.jdbc.Driver");
  5.             // Setup the connection with the DB
  6.             DbConnection = DriverManager
  7.                     .getConnection("jdbc:mysql://localhost/jookphone?"
  8.                             + "user=jookphone&password=20025663");
  9.            
  10.         Integer RemoveID = 3;
  11.         SearchDb = DbConnection.SearchDb("DELETE FROM songinformation WHERE SongID = ?");
  12.         SearchDb.setLong(1, RemoveID);
  13.        
  14.         System.out.println("Song Deleted");
  15.         }
  16.     }
Add Comment
Please, Sign In to add comment