If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back  dBforums > Database Server Software > DB2 > Sqlcode: -803, Sqlstate: 23505...

LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Registered User
Join Date: Mar 2005
Posts: 3
DB2 Insert statement with error SQLCODE: -803, SQLSTATE: 23505

I am trying to Java PrepareStatement insert into a table db2 table and get this error:
However, when I ran the insert statement it works fine.

Anyone have any ideal what happen here
Reply With Quote
  #2 (permalink)  
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 5,398
SQL0803N One or more values in the INSERT statement, UPDATE
statement, or foreign key update caused by a DELETE
statement are not valid because the primary key, unique
constraint or unique index identified by
"<index-id>" constrains table "<table-name>" from
having duplicate rows for those columns.
In other words, you tried to insert a value that violated a unique constraint.
"It does not work" is not a valid problem statement.
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On