aspose file tools
The moose likes JDBC and the fly likes exception related to data constraint Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "exception related to data constraint" Watch "exception related to data constraint" New topic
Author

exception related to data constraint

Raj Ohadi
Ranch Hand

Joined: Jun 30, 2006
Posts: 314
For a table that has "unique index" constraint --- for example the table has 10 columns. One of them is PK, I add another constraint that the combination of 5 columns has to be unique. Then when I use JDBC to insert a row, if it violates this constraint, what kind exception will be thrown ? will it be a regular SQL Exception or what ?

how do I know it is caused by this particular problem when an exception is thrown ?
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: exception related to data constraint
 
Similar Threads
trigger to check if a row can be inserted or not
JDO issue
Hibernate: How to delete mapping table
OJB and Unique Keys
Pimary keys in entity beans