views:

209

answers:

1

I am attempting to wipe and repopulate test data on SQL CE. I am getting an error due to FK constraints existing. Typically in Sql2005 I would

ALTER TABLE [tablename] CHECK/NOCHECK CONSTRAINT ALL
to enable/disable all constraints. From what I could find in my searching, it seems that this might not be supported in CE. Is that true? If so, is there an alternative?

+1  A: 

NOCHECK is not supported on SQL CE 3.1/3.5

ALTER TABLE SQL CE

The usual method to accomplish this is to drop the constraint, do your operations and then add it back.

Jason Short