'I am recieving no error when this runs but the edited values don't save and revert when viewed again
I am trying to update records in a database but when I run my code, the updated records don't save
conn = sqlite3.connect('test.db')
c = conn.cursor()
c.execute("""UPDATE stock SET StockName = :sname, StockPrice = :sprice, StockNumber = :snumber WHERE StockID = :StockID""",
{
'sname': stockname_entry.get(),
'sprice': stockprice_entry.get(),
'snumber': stocknumber_entry.get(),
'StockID': stockid_entry.get(),
})
conn.commit
conn.close
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
