Do tuo want to have a new record every time you do an update?
You can create a second table to store the history using a trigger on the first table
Here is my SQL initialize code. Maybe somethingis wrong.
If File.Exists(File.DirInternal,"database.sql") = False Then File.Copy(File.DirAssets,"database.sql",File.DirInternal,"database.sql")
End If
If SQL1.IsInitialized = False Then
SQL1.Initialize(File.DirInternal, "database.sql", False)
End If
I am thinking about somekind of import from txt or csv to sql.
Dim su As StringUtils
Dim Table As List
Table = su.LoadCSV(File.DirAssets, "matrix.csv", ";")
Dim Table2 As List
Dim Items() As String
Table2.Initialize
For i = 0 To Table.Size - 1
Items = Table.get(i)
Dim m As Map
m.Initialize
m.Put("panel", Items(0))
m.Put("cat", Items(1))
m.Put("size", Items(2))
m.Put("price", Items(3))
m.Put("alum", Items(4))
m.Put("access", Items(5))
m.Put("largepanel", Items(6))
m.Put("oversized", Items(7))
m.Put("oversizednum", Items(8))
m.Put("extra1", Items(9))
m.Put("extra2", Items(10))
m.Put("extra3", Items(11))
Table2.Add(m)
Next
DBUtils.InsertMaps(Main.SQL1, "matrix", Table2)
This is the code I use for importing from csv in my app.
B4X:Dim su As StringUtils Dim Table As List Table = su.LoadCSV(File.DirAssets, "matrix.csv", ";") Dim Table2 As List Dim Items() As String Table2.Initialize For i = 0 To Table.Size - 1 Items = Table.get(i) Dim m As Map m.Initialize m.Put("panel", Items(0)) m.Put("cat", Items(1)) m.Put("size", Items(2)) m.Put("price", Items(3)) m.Put("alum", Items(4)) m.Put("access", Items(5)) m.Put("largepanel", Items(6)) m.Put("oversized", Items(7)) m.Put("oversizednum", Items(8)) m.Put("extra1", Items(9)) m.Put("extra2", Items(10)) m.Put("extra3", Items(11)) Table2.Add(m) Next DBUtils.InsertMaps(Main.SQL1, "matrix", Table2)