Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SQL Exception

843859Oct 5 2006 — edited Oct 5 2006
Hey All,

I am inserting date from frontend to SQL DB with servlet where I havee put below function in try {} of Servlet :

java.sql.Date date_fe = null;
java.text.SimpleDateFormat formatter = new java.text.SimpleDateFormat("dd/MM/yyyy");
date_fe = new java.sql.Date(formatter.parse(empl_doj_fe).getTime());

Sometimes it is taking values such as 01/01/2001 but very next moment it is giving problem for same date format, the exception it returns is :

java.sql.SQLException: ORA-00001: unique constraint (NAMAN_LSR.SYS_C0014552) violated

I couldn`t get the error in this, so any help will be welcomed.

Thax & rgds,
nhb007
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 2 2006
Added on Oct 5 2006
10 comments
118 views