TableAdapter. Not all constraints from database table configured

TableAdapter. Not all constraints from database table configured

Post by VGVycnkgV2 » Fri, 17 Aug 2007 02:28:01


I have a table in SQL Server 2005 that has a primary key along with unique
constraint on two columns. When I create a TableAdapter for the table the
primary key is created but the unique constraint for the two columns is not.

Why not? Am I missing a step or is this a limitiation of the TableAdapter?

Thanks for your help,

1. TableAdapter not updating table if the table is empty when loaded?

2. "Failed to enable constraints" problem with TableAdapters

Hi friends,
I am getting the well-known "Failed to enable constraints. One or more rows
contain values violating non-null, unique, or foreign-key constraints."
message in one ASP .net application.
In order to get these "One or more rows", we have GetError method in
dataset, but I am dealing with tableadapter. I have created tableadapter
using wizard. I have no idea how to disable EnableConstraints property or use
GetError method in case of tableadapter created using wizard. (I have tried
ClearBeforeFill=true, but the problem persists)
Please help me to solve problem.

Thanks in advance,

3. Check constraints on Tables within UDFs - cannot drop constraint l


5. Determine table constraints for database upgrade/migration project

6. How to drop Constraints from all table at once in a database

7. foreign key constraints between tables in different databases

8. Determine table constraints for database upgrade/migration pro

9. How to copy a table including all constraints,... to same database

10. Creating a new filtered dataSet (new tableadapter) from an exisitng tableAdapter in the XSD

11. fmincon constraints: why do inequality constraints fail but bound constraints succeed?

12. Could not find row in sysconstraints for constraint ID in Database

13. Functions in CHECK constraint not getting dumped before tables.

14. Could not drop the primary key constraint '%.*ls' because the table has an XML index

15. ADDing COLUMN to the table with exising data with DEFAULT value and NOT NULL constraint