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.
1 parent 74af346 commit 0cca47cCopy full SHA for 0cca47c
sql_server/pyodbc/base.py
@@ -606,14 +606,16 @@ def fetchone(self):
606
def fetchmany(self, chunk):
607
try:
608
return self.format_rows(self.cursor.fetchmany(chunk))
609
- except ProgrammingError:
+ except (ProgrammingError, Database.Error):
610
return []
611
612
def fetchall(self):
613
614
- return self.format_rows(self.cursor.fetchall())
615
+ rows = self.cursor.fetchall()
616
617
+ else:
618
+ return self.format_rows(rows)
619
620
def __getattr__(self, attr):
621
if attr in self.__dict__:
0 commit comments