我目前正在尝试学习如何使用PYODBC将sqlserver中的数据库与Python连接起来,但问题是这个错误不断出现,我不知道如何解决它
import pyodbc as connector
conecction=connector.connect("Driver:{SQL Server Native Client
11.0};","Server:the name of my server xd;","Database:materiasApp;","Trusted_Connection=yes;")
我得到了这个错误:
conecction=connector.connect("Driver:{SQL Server Native Client 11.0};","Server:again the name of my
server xd;","Database:materiasApp;","Trusted_Connection=yes;")
TypeError: function takes at most 1 non-keyword argument
对于pyodbc,可以使用带有
=
的单个连接字符串进行赋值,也可以使用多个关键字:相关问题 更多 >
编程相关推荐