
Hi,
Following error is coming in my program.
Error is: Generated keys not requested. You need to specify Statement.RETURNGENERATEDKEYS to Statement.executeUpdate() or Connection.prepareStatement().
What could be solutions
Thanks

Hi,
You should add the following code in your program:
PreparedStatement pstmtInsert = conn.prepareStatement(queryInsert,Statement.RETURN_GENERATED_KEYS);
Thanks
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.