- #1
zak100
- 462
- 11
Hi,
I have a id field in a table which is delared as a primary key.
When I am entring the same id again & I am getting following errors:
MySQLIntegrityConstraintViolationException: Duplicate entryI am catching SQLException:
The code enters in the catch block.
Its printing "Testing". So exception is caught. So why i am getting this error. Some body please guide me how to handle this error.Zulfi.
I have a id field in a table which is delared as a primary key.
When I am entring the same id again & I am getting following errors:
MySQLIntegrityConstraintViolationException: Duplicate entryI am catching SQLException:
Java:
catch(SQLException se){
//Handle errors for JDBC
JOptionPane.showMessageDialog(null, "Testing");
se.printStackTrace();
}
The code enters in the catch block.
Its printing "Testing". So exception is caught. So why i am getting this error. Some body please guide me how to handle this error.Zulfi.