Surendra Sharma

Surendra Sharma

Search This Blog

Tuesday, July 22, 2014

column Id is constrained to be unique. value is already present

If you are working with dataset in .NET and facing error as "column Id is constrained to be unique. value is already present."
Then simply set

datasset.EnforceConstraints = false;

It does not check the constraints at .net side. When you are going to update dataset records into database, all constraints fire at database level.

Please leave your comments or share this tip if it’s useful for you.