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
Post a Comment