mysql - How to get error from preparedstatement for inserting from JDBC -


i using preparedstatement in jdbc insert records. set unique index on table. when run sql against mysql db console, got following error expected

duplicate entry 'val1-val2' key 'some_unique_key_idx' 

but when run same jdbc. don't see error reported, although result returned "0" means nothing got inserted. there anyway duplicate entry error?


Comments

Popular posts from this blog

java - How to Configure JAXRS and Spring With Annotations -

visual studio - TFS will not accept changes I've made to a Java project -

php - Create image in codeigniter on the fly -