Help saving data to database

Your original code had:

curs.execute("INSERT INTO Books(Category,Title,Author,Year_Purchased,\
                 Comments) VALUES(?, ?, ?,?,?)", (vCat,vTit,vAuth,vYear,\
                                                  vComments) );  

and your new code has:

curs.execute("INSERT INTO Books(Record,Category,Title,Author,Year_Published,Comments)\
         VALUES(NULL,?, ?, ?, ?, ?), (Record,Category,Title,Author,Year_Published,Comments)");

Do you see the difference?

(Also, you don’t need the semicolon at the end of the line.)

1 Like