Skip to content

Commit 70c17d5

Browse files
committed
fix case of sp_MSforeachtable
1 parent b81a024 commit 70c17d5

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
@@ -479,12 +479,12 @@ def check_constraints(self, table_names=None):
479479

480480
def disable_constraint_checking(self):
481481
if not self.needs_rollback:
482-
self.cursor().execute('EXEC sp_msforeachtable "ALTER TABLE ? NOCHECK CONSTRAINT ALL"')
482+
self.cursor().execute('EXEC sp_MSforeachtable "ALTER TABLE ? NOCHECK CONSTRAINT ALL"')
483483
return not self.needs_rollback
484484

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

489489

490490
class CursorWrapper(object):

0 commit comments

Comments
 (0)