We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ff59848 + 06417e8 commit a8ceb4eCopy full SHA for a8ceb4e
mssql/base.py
@@ -490,12 +490,12 @@ def check_constraints(self, table_names=None):
490
491
def disable_constraint_checking(self):
492
if not self.needs_rollback:
493
- self.cursor().execute('EXEC sp_msforeachtable "ALTER TABLE ? NOCHECK CONSTRAINT ALL"')
+ self._execute_foreach('ALTER TABLE %s NOCHECK CONSTRAINT ALL')
494
return not self.needs_rollback
495
496
def enable_constraint_checking(self):
497
498
- self.cursor().execute('EXEC sp_msforeachtable "ALTER TABLE ? WITH NOCHECK CHECK CONSTRAINT ALL"')
+ self._execute_foreach('ALTER TABLE %s WITH NOCHECK CHECK CONSTRAINT ALL')
499
500
501
class CursorWrapper(object):
0 commit comments