views:

61

answers:

2

HRESULT: 0X80040E2F (DB_E_INTEGRITYVIOLATION) Error message: Value violated the integrity constraints for a column or table.

Can anybody tell me how to solve this error.

A: 

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

Marcelo Cantos
+3  A: 

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).

APC