How to store user responses | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to store user responses

Hi, I'm developing a basic questionnare with a javafx UI. I need to store users' responses offline, and I need a simple but safe (e.g. against accidental output file deletion or content modification) method to do so. My first thought was to produce (or modify) a password-protected xls spreadsheet in a hidden folder as an output when the program is used. Are there smarter and safer methods?

16th Mar 2019, 3:35 PM
Ema261989
Ema261989 - avatar
3 Answers
+ 2
I think working with Excel files could be really challenging, I would opt for a much simpler solution, like writing a bytestream into a file, or using a sqlite database. There is probably no absolute guarantee against modification or deletion, but choosing the file location can conceal it from the user, like saving it in a purposefully hidden folder, eg. AppData on Windows.
17th Mar 2019, 3:04 AM
Tibor Santa
Tibor Santa - avatar
+ 1
Thank you for your response. Following your suggestion, I implemented a sql database stored in AppData, I find it easier than excel to manage.
18th Mar 2019, 10:30 PM
Ema261989
Ema261989 - avatar
+ 1
Well done Ema261989 , glad to hear that my idea was helpful :)
19th Mar 2019, 12:21 AM
Tibor Santa
Tibor Santa - avatar