Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def updateTable():
- def updatedb():
- conn = sqlite3.connect('keys.db')
- c = conn.cursor()
- record_id = oidEntry.get()
- c.fetchall()
- newpass = "".join(updatepassEntry.get())
- c.execute("SELECT * FROM " + showTable + " WHERE oid = " + record_id)
- c.execute("UPDATE " + showTable + """ SET
- file = :file,
- key = :key
- WHERE oid = :oid""",
- {':key': newpass,
- ':oid': oidEntry.get()
- })
- conn.commit()
- updatewin.destroy()
- return
- showTable = "".join(tablelist.get(tablelist.curselection()))
- updatewin = Tk()
- updatewin.geometry("500x500")
- oidLabel = Label(updatewin, text="OID")
- oidEntry = Entry(updatewin, width=2)
- oidLabel.grid()
- oidEntry.grid(row=1)
- updatepassLabel = Label(updatewin, text="Passphrase")
- updatepassEntry = Entry(updatewin, width=30)
- updatepassLabel.grid(row=4)
- updatepassEntry.grid(row=5)
- updatetableinfoButton = Button(updatewin,
- text="Submit",
- command=updatedb)
- updatetableinfoButton.grid(row=6)
- updatewin.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement