I'm having problems updating a database. I use the prepared statement because I want to call some methods to get the values to return. The program compiles and runs fine, but it doesn't update the database.
That's how I'm doing it. I made sure everything is the same between the DB and my code, so I don't think that's a problem.Code:PreparedStatement stmt = databaseConnection.prepareStatement("INSERT INTO Session (Last_Name, First_Name,User_Name, Password, Gender, Email_Address) VALUES(?,?, ?, ?, ?, ?)"); stmt.setString(1, "B"); stmt.setString(2, "C"); stmt.setString(3, "D"); stmt.setString(4, "E"); stmt.setString(5, "F"); stmt.setString(6, "G"); stmt.executeUpdate();




Reply With Quote