Hi I am attempting an insert statement but keep getting the following error:
java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 3.
Here is my code:
try {
Statement stmt = con.createStatement();
String mySqlStatement = "INSERT INTO EntrantDetails (ID, Name, Surname, Gender, DOB ChipNum) VALUES (" + details.getIDNum()+ "," + details.getName() + "," + details.getSurname() + "," + details.getGender() + "," + details.getDOB() + "," + details.getChipNum() + ")";
stmt.executeUpdate(mySqlStatement);
}
catch (Exception ex)
{
ex.printStackTrace();
}