how to test error

1 回表示 (過去 30 日間)
Isee You
Isee You 2012 年 3 月 4 日
this error hapens when i save data to my data base(mysql) i want to a code to test this error .if it happens i can do any ting like "msg" or any thing so the program run without any error shows on command window
the error is
Error using com.mysql.jdbc.JDBC4PreparedStatement/executeBatch
Java exception occurred:
java.sql.BatchUpdateException: Duplicate entry '1-56' for key
'PRIMARY'
at
com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2020)
at
com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1451)

採用された回答

Honglei Chen
Honglei Chen 2012 年 3 月 5 日

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDatabase Toolbox についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by