我尝试使用ubuntu通过库pyodbc远程连接python与sql server,但是我失败了。
这是我的代码:
server = "INA01SRV03A\ANA01SQL020"
database = "General_Ops_Pricing"
username = "usernameMy"
password = "passwordMy"
cnxn = pyodbc.connect('DRIVER={SQL Server};SERVER=' + server + ';DATABASE=' + database + ';UID=' + username + ';PWD=' + password + "'")
有人可以帮助我吗?