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

You will have to update the biding source be either recreating it or editing it in the GUI.

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.