[I apologize if this is a duplicate message, I've been getting delivery 
failure reports...]

I have encountered a bug in OJB related to detecting unique constraint 
violations in DB2. This seems to work fine on Microsoft SQL Server and 
MySQL (I haven't tried other databases). The problem is that the check for 
the DB2 SQLSTATE code for unique constraint violation (23505) is only 
checked during insert, not during update.
 
Specifically, in JdbcAccessImpl (source from OJB 1.0.3, dated 
03-April-2005), executeInsert() specifically checks for the DB2 SQLSTATE 
(defined as SQL_STATE_FK_VIOLATED). However, executeUpdateSQL() and 
executeUpdate() only check for SQL_STATE_KEY_VIOLATED (23000).
 
I see in CVS that this has been fixed (by factoring new ExceptionHelper 
class). Will this fix be included in 1.0.4? If so, is there a planned 
release date for 1.0.4? If not, would it be possible to fix this in 1.0.4 
in JdbcAccessImpl directly by adding the check for SQL_STATE_FK_VIOLATED 
to executeUpdate() and executeUpdateSQL()?
 
Thanks
- Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to