• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Unique Key Constraint Violated

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I am getting the following error when i try to insert a record into the database:

"Unique Key Constraint [<SchemaName>.<PrimaryKery Constraint for the table>] violated"

The primary key for the table in which i try to insert a record is generated using Sequences in ORACLE. So i am not able to get why still the constraint is violated
 
Ranch Hand
Posts: 867
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Sridevi Sangaiah

could you type the code of Sequences here?

Please try to check the attribute of primary key which contains reference to other foreign key that contain unique key constraint or not.

 
Ranch Hand
Posts: 1143
1
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sridevi,
Use

and not

Perhaps the sequence value is clashing with a manually supplied value?
Perhaps the sequence has reached its maximum value?

Good Luck,
Avi.
 
reply
    Bookmark Topic Watch Topic
  • New Topic