开发者

Insert problem in oracle database

HRESULT: 0X80040E2F (DB_E_INTEGRITYVIOLATION) Error m开发者_开发技巧essage: Value violated the integrity constraints for a column or table.

Can anybody tell me how to solve this error.


So, this is an OLEDB error message meaning:

"A specified value violated the integrity constraints for a column or table."

Utterly generic and not very helpful. What it means is that one of the values you are attempting to insert into a table fails a database constraint.

There are several different types of constraint: unique / primary key constraints, foreign key constraints, NOT NULL and check constraints. Find out more.

Oracle has several database views which can provide you with information about the constraints in force for a given table. USER_CONSTRAINTS lists the constraints at the table level and USER_CONS_COLUMNS gives you information about the constrained columns. (There are also ALL_ and DBA_ versions of these views, if the table's owner is not the user you're coonecting through).


This usually means you are trying to insert a duplicate value for a unique key. If so, the solution is to not do that.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜