db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geter <geter.capell...@gmail.com>
Subject How to avoid SQLState 23505 (Violation because of duplicated key)
Date Mon, 18 Feb 2008 17:55:21 GMT

Hi,

I am getting SQLState 23505 on mass data loading into Derby. After checking
the data being loaded I confirmed there were duplicated data causing the
error, so the exception thrown is appropriate.

My problem is that it aborts subsequent inserts into the database. How to
avoid Derby to abort the operation and continue to insert subsequent data? I
thought in querying the database for the existing key thus avoiding an
attempt to reinsert and existing key but it will be very costly so that I
would like to avoid it.

Thanks in advance,
Geter
-- 
View this message in context: http://www.nabble.com/How-to-avoid-SQLState-23505-%28Violation-because-of-duplicated-key%29-tp15547074p15547074.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.


Mime
View raw message