0

Hi.
I needed to change two fields in my database and now my application doesn't start.
What do I need to do to the dataset?

The error is: Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.

I changed the type of one of the fields in access (from boolean to number) [the other field kept the same type]

thanks in advance

3
Contributors
2
Replies
4
Views
4 Years
Discussion Span
Last Post by lolafuertes
0

The response from Beggierdev mostly will solve your problem.

In case that does not, the message

The error is: Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.

means that you are trying to insert or update a record in the database. Te record being updated or inserted is not well formed by one (or more) of the reasons exposed:
a) almost one field in the record is null but the definition in the DB requires to be not null
b) the field(s) forming the primary key value of the record will create a duplicate key entry in the DB, amd this is not allowed
c) almost one field in the record has some content the must exist in a related table (foreing key restriction) but does not.

I'll suggest to check the values being inserted or updated in the DB to find where the problema is.

Hope this helps

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.