Best way to save Forms on Server (pending)
-
Im currently on a Project where Users are filling in Forms wich then must be saved on a Server. The Problem is that there are many different types of Forms who also can be different the next time you login. At the moment this doenst have to be extremly efficient but flexible, safe and (thats my wish) easy to code ;)
So I thought about creating QSettings or QMaps for each form -> Convert them to a String and save them to a MySQL Database. So there is a Table for each User and a Row for each filled out Form (ID INT and Formdata as TEXT).
What do you think about this soloution?
Are there Anny better / easier / faster / more efficient ways to accomplish what i want? -
Hi,
What do you mean by save forms on server ? Do your users fill some kind of poll/mcq ? Are you storing only the results ?
-
The users are creating and configuring orders and fill out things like quantity, color and article specific things.
Yes the results are the Values that have to be saved, but in case that fields have to be changed i must provide the function to find the right fields.
So I thought about a Key / Value System (QSettings, Map) or a XML Scheme and Save this on the DataBase.
-
So some kind of order editor where they can pick what fields they want to put in ? Are you using a centralized place to retrieve new available fields ?
-
No not exactly that, They just choose an Article that includes many Fields). And every Article has some special Fields / Values. When the Program starts it downloads all the information about the Articles / Fields and kepps them. So yes I use a centralized place here. But in this case its a csv file (for the sake of simplicity so those i create the program for can edit their articles "easily"). But the Article list just works like a Template. Users select one and the Software creates a Form from it with many Fields. And when the user closes the Program this fields have to be saved on the Server (It doesnt have to be a Database but i think it makes sense).
the "only" problem is that every Row could have other "collumns" so a common Table wouldnt work. So I thought about just a ID Collumn and a Text Collumn where I store all the Informations of a Form in one String (QSettings, QMap, CSV, whatevar).
My Question is if there are "Better" or "more efficient" or "more easily" options i can solve this?
Sry If i made myself not clear about some things ;)
-
Sounds like you really need to design that at a database level and model your order there first. An order being a set of fields so that you can save it cleanly in the database (and search through if needed)