Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void DeleteSong() throws Exception {
- try {
- // This will load the MySQL driver, each DB has its own driver
- Class.forName("com.mysql.jdbc.Driver");
- // Setup the connection with the DB
- DbConnection = DriverManager
- .getConnection("jdbc:mysql://localhost/jookphone?"
- + "user=jookphone&password=20025663");
- Integer RemoveID = 3;
- SearchDb = DbConnection.SearchDb("DELETE FROM songinformation WHERE SongID = ?");
- SearchDb.setLong(1, RemoveID);
- System.out.println("Song Deleted");
- }
- }
Add Comment
Please, Sign In to add comment