首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > oracle >

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

2014-01-28 
请问sqlca.sqlcode 的值为 -1是什么错误,该怎么解决啊?????------解决方法-------------------------------

请问   sqlca.sqlcode 的值为 -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.

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

        

热点排行