John Neel
John Neel

Reputation: 1

JavaFXML - Update TableView SQLite

I have created a TableView in scenebuilder and it is populated with data from a table in SQLiteStudio. I have managed to fill all textfields once the user clicks on a row. The code for that is here:

I have created a update button that is setOnAction. I have tried this code below to allow the users new entry in the textfield to overwrite the original but it is not working. Apparently, my sql query is not correct and I should included something in SQLite database. I just don't know how to do this.

Thank you any help given

Upvotes: 0

Views: 187

Answers (1)

Powercoder
Powercoder

Reputation: 755

Your update code sends changes to database only and does not affect TableView. To update TableView you should also set new data to object from TableView like you got old data from it in fill but in the opposite direction.

Upvotes: 1

Related Questions