使用pyodbc
模块通过python连接到MS-SQL Server时如何克服以下错误?
Traceback (most recent call last):
File "test_db.py", line 2, in <module>
cnxn = pyodbc.connect(r'Driver={SQL Server};Server=.\ITRES-PRD-SQL-1;Database=testdb;Trusted_Connection=yes;')
pyodbc.Error: ('IM002', '[IM002] [unixODBC][Driver Manager]Data source name not found, and no default driver specified (0) (SQLDriverConnect)')