通过pyodbc连接,奇怪的错误

时间:2018-05-01 00:12:52

标签: python sql-server visual-studio-code pyodbc

运行此操作后我收到以下错误:

  connection = pyodbc.connect('DRIVER={ODBC Driver 17 for SQL Server};SERVER=xxxxx.xxxx.net;PORT=1443;DATABASE=xxx;UID=xxxx;PWD=xxxx')
cursor = connection.cursor()
SQLCommand = ("SELECT [Date]...FROM [dbo].[...]")
cursor.execute(SQLCommand)
results = cursor.fetchone()
connection.close

错误:libc ++ abi.dylib:以std :: runtime_error类型的未捕获异常终止:collat​​e_byname :: collat​​e_byname无法为C / en_US.UTF-8 / C / C / C / C构造

关于如何修复的任何想法?

0 个答案:

没有答案