一直试图弄清楚多年来的上述错误,无法弄明白。尝试了其他解决方案,但没有用。我是否必须将其更改为元组?我如何支持?值,因为列在我的数据库中没有名称。无法弄明白。
感谢任何帮助。
这是我的代码:
Scanner sc = new scanner (system.in)
filename = sc.nextline()
这是返回错误的代码的一部分。
追溯:
def Update_db_table():
global File_CSV
# Open the csv and then covert it for SQL and place in table
Open_CSV = reader(open(File_CSV, 'r',encoding="utf-8"), delimiter=',')
print (Open_CSV)
for row in Open_CSV:
to_db = [(row[0], "utf8"),(row[1], "utf8"), (row[2], "utf8"), (row[3], "utf8"),(row[4], "utf8"),(row[5], "utf8"),(row[6], "utf8"),(row[7], "utf8")]
RFID_db.execute("INSERT INTO 'All_Students' (First_Name, Last_Name, RFID_Number, Student_Age, Gender, Cohort, Non_Champion_Points, Champion_Points) VALUES (?, ?, ?, ?, ?, ?, ?, ?);", to_db)
connection.commit()
谢谢,
干杯!