PYODBC--Data source name not found and no default driver specified

后端 未结 15 1826
暖寄归人
暖寄归人 2020-11-28 13:01
import pyodbc
connection = pyodbc.connect(\'Driver = {SQL Server};Server=SIWSQL43A\\SIMSSPROD43A;\'
                            \'Database=CSM_reporting;Trusted_Conn         


        
15条回答
  •  悲哀的现实
    2020-11-28 13:11

    for error : pyodbc.InterfaceError: ('IM002', '[IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (0) (SQLDriverConnect)')

    No space between the driver and event

    connection = Driver={SQL Server Native Client 11.0}; "Server=servername;" "Database=dbname;" "Trusted_Connection=yes;"

提交回复
热议问题