I am having troubles with changing a value in table to update MySQL. I run the following cellEdited script. It will look like it takes after I hit enter. However, after a few seconds it will change back and not update MySQL table to reflect the change I want. I don't get any errors and database table is correct. (test_locationn). I am trying to change Completed column and specific row from "N" to "Y". Thank you for any help.
Completed = event.source.data.getValueAt(event.source.selectedRow, 'completed')
headers = system.dataset.getColumnHeaders(event.source.data)
query = "UPDATE test_locationn SET %s = ? WHERE Completed = ?" %(headers[event.column])
args = [event.newValue, Completed]
system.db.runPrepUpdate(query, args)