Skip to content

Commit 604de93

Browse files
committed
fix case of sp_MSforeachtable
1 parent 79e421a commit 604de93

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sql_server/pyodbc/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -481,12 +481,12 @@ def check_constraints(self, table_names=None):
481481

482482
def disable_constraint_checking(self):
483483
if not self.needs_rollback:
484-
self.cursor().execute('EXEC sp_msforeachtable "ALTER TABLE ? NOCHECK CONSTRAINT ALL"')
484+
self.cursor().execute('EXEC sp_MSforeachtable "ALTER TABLE ? NOCHECK CONSTRAINT ALL"')
485485
return not self.needs_rollback
486486

487487
def enable_constraint_checking(self):
488488
if not self.needs_rollback:
489-
self.cursor().execute('EXEC sp_msforeachtable "ALTER TABLE ? WITH CHECK CHECK CONSTRAINT ALL"')
489+
self.cursor().execute('EXEC sp_MSforeachtable "ALTER TABLE ? WITH CHECK CHECK CONSTRAINT ALL"')
490490

491491

492492
class CursorWrapper(object):

0 commit comments

Comments
 (0)