问题
When I type in the code:
connection = pypyodbc.connect(driver='{SQL Server}', server=ServerName, database=DatabaseName, uid=UserId, pwd=Password)
I get this error:
ProgrammingError: (u'42000', u"[42000] [Microsoft][ODBC SQL Server Driver][SQL Server]Reference to database and/or server name in 'master..sysdatabases' is not supported in this version of SQL Server.")
Does anyone know how to fix it?
来源:https://stackoverflow.com/questions/45201916/how-to-properly-connect-to-sql-server-in-python-using-pypyodb