Skip to content

Commit

Permalink
Merge pull request #167 from hhyo/bugfix/use-issue-mssql
Browse files Browse the repository at this point in the history
修改mssql对应的use语句, 规避特殊符号问题
  • Loading branch information
hhyo committed May 5, 2019
2 parents 72c279d + 140f19b commit e583c28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sql/engines/mssql.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def query(self, db_name=None, sql='', limit_num=0, close_conn=True):
conn = self.get_connection()
cursor = conn.cursor()
if db_name:
cursor.execute('use {};'.format(db_name))
cursor.execute('use [{}];'.format(db_name))
cursor.execute(sql)
if int(limit_num) > 0:
rows = cursor.fetchmany(int(limit_num))
Expand Down

0 comments on commit e583c28

Please sign in to comment.