Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修改mssql连接串,解决实例不能连接问题。 #235

Merged
merged 1 commit into from
May 29, 2019
Merged

修改mssql连接串,解决实例不能连接问题。 #235

merged 1 commit into from
May 29, 2019

Conversation

AceAttorney
Copy link
Contributor

#173

遇到了一样的问题,修改连接串解决

@codecov
Copy link

codecov bot commented May 29, 2019

Codecov Report

Merging #235 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #235   +/-   ##
=======================================
  Coverage   82.21%   82.21%           
=======================================
  Files          64       64           
  Lines        7962     7962           
=======================================
  Hits         6546     6546           
  Misses       1416     1416
Impacted Files Coverage Δ
sql/engines/mssql.py 79.45% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c69abc4...dcca35a. Read the comment docs.

@LeoQuote
Copy link
Collaborator

LeoQuote commented May 29, 2019

请问有没有相关的讲解链接, 我之前在文档上查的是这种写法, 难道标准有变化?

参考的链接: https://www.connectionstrings.com/sqlconnection/connect-via-an-ip-address/

还有这里的文档 https://github.com/mkleehammer/pyodbc/wiki/Tips-and-Tricks-by-Database-Platform#using-fast_executemany-with-a-temporary-table

@LeoQuote
Copy link
Collaborator

请问你那边的mssql 版本是多少? 刚刚查了我这边是2012

@AceAttorney
Copy link
Contributor Author

请问你那边的mssql 版本是多少? 刚刚查了我这边是2012

我这边是sqlserver 是 2016和2008都有 没有2012 我看你给的链接里 就是我刚提交的写法呀

我之前拉下来代码里是

# sql\engines\mssql.py
connstr = """DRIVER=ODBC Driver 17 for SQL Server;SERVER={0};PORT={1};UID={2};PWD={3};
        client charset = UTF-8;connect timeout=10;CHARSET=UTF8;""".format(self.host,
                                                                          self.port, self.user, self.password)

@LeoQuote
Copy link
Collaborator

LeoQuote commented May 29, 2019

刚刚验证了 sql server 2012 没问题, 可以正常操作.

感谢修复bug .

@LeoQuote LeoQuote merged commit 0053eab into hhyo:master May 29, 2019
@AceAttorney AceAttorney deleted the bug-fix/mssql-odbc branch May 29, 2019 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants