系统错误:<class'pyodbc。错误'>返回了一个带有错误s的结果

2024-09-30 20:17:09 发布

您现在位置:Python中文网/ 问答频道 /正文

def insert(self):
    conn = pyodbc.connect(
        'Driver={SQL Server};'
        'Server=DESKTOP-S0VG212\SQLEXPRESS;'
        'Database=MovieGuide;'
        'Trusted_Connection=yes;'
    )
    cursor = conn.cursor()

执行查询时出错,但我不知道是什么原因造成的。在

^{pr2}$

Tags: selfsqlserverdefdriverconnectconncursor