日期:2014-05-17  浏览次数:20900 次

请问 sqlca.sqlcade 的值是 -1 是什么错误,该怎么解决啊?????
请问   sqlca.sqlcade   的值是   -1   是什么错误,该怎么解决啊?????

------解决方案--------------------
具体看sqlca.sqlErrText信息
看它提示什么然后相应的采取措施
------解决方案--------------------
> oerr ora 1
00001, 00000, "unique constraint (%s.%s) violated "
// *Cause: An UPDATE or INSERT statement attempted to insert a duplicate key.
// For Trusted Oracle configured in DBMS MAC mode, you may see
// this message if a duplicate entry exists at a different level.
// *Action: Either remove the unique restriction or do not insert the key.

==========================
原因:插入的记录与唯一性约束有冲突。
解决:对重复记录进行单独处理,或跳过,或记录日志。