hello
I need some help
I wanted to create a database through a button.
My idea was when I wanted to create a database I would enter the name I wanted and when I clicked the button, the button would create it for me.
The database will always be the same the only thing that will change is the name.
It is possible?
Hi @rafael.neto, probably your app design is wrong because normally you shouldn’t need this. Why do you need to create a table dynamically?
What do you mean by ‘create a database’?
i want to create in this way because one machine will have more than 100 different types of material and i have more that 20 machines.
If i put all os this in one data base will be full of information and will probably be slow to filter and export later.
If i can create a database automatically i can separate which material one machine have.
The structure is always the same, like in this image, the only thing i want to change with the button is the “Type name”.
My approach would be:
Table 1) a tables of machines
name | uniqueId
Table 2) A table of materials
name | uniqueID
Table 3) a table of ( machine | materials )
machine | materials | quantity
Then you can query table 3 and ask for all ( machine | materials ) where machine = machine X
2 Likes
I use your ideia it works fine.
now i’m trying to do now is when i click on “Guardar Dados” (Save Data), i want to take the same amount on the stock quantiy.