Lylio
Lurker
Hi everyone,
I have a very simple app built in Android Studio. I'm trying to update information in a database, but some of the fields are being overwritten as blank. I've created a short video which shows the issue better than I can explain it here (best to watch it on YouTube rather than the preview here):
Basically, I'm using text fields to update parts of the information already stored in the database. The problems is, if I click on my 'update' button, and any of those fields are blank, the data is being erased. Hopefully the video above is a lot more clear.
If it helps, the code for the activity you see in the video is here: https://github.com/Lylio/GradeRunne...lechristine/graderunner/MainMenuActivity.java
and the database helper for the example in the video is here: https://github.com/Lylio/GradeRunne...lylechristine/graderunner/DatabaseHelper.java
I'd be really grateful if anyone could help. I presume the solution would involve saving the data that's already in the database into temporary variables, and then re-writing them when the 'update' button is pressed. But I'm a little unsure of where/how to code that.
Many thanks everyone,
Lylio
I have a very simple app built in Android Studio. I'm trying to update information in a database, but some of the fields are being overwritten as blank. I've created a short video which shows the issue better than I can explain it here (best to watch it on YouTube rather than the preview here):
Basically, I'm using text fields to update parts of the information already stored in the database. The problems is, if I click on my 'update' button, and any of those fields are blank, the data is being erased. Hopefully the video above is a lot more clear.
If it helps, the code for the activity you see in the video is here: https://github.com/Lylio/GradeRunne...lechristine/graderunner/MainMenuActivity.java
and the database helper for the example in the video is here: https://github.com/Lylio/GradeRunne...lylechristine/graderunner/DatabaseHelper.java
I'd be really grateful if anyone could help. I presume the solution would involve saving the data that's already in the database into temporary variables, and then re-writing them when the 'update' button is pressed. But I'm a little unsure of where/how to code that.
Many thanks everyone,
Lylio