Hi All
I have a SQL file which the data changes depending on the use of the program. I initially thought that Save Map would work but there is no List of Maps unless I save a list of maps, but then I saw, saveList is converted to text.
Would it be better to Convert the list of maps to a string array and then saved as bytes ?
My SQL database has 40 fields and depending on which config is required will be the one loaded up.
I made a small test that works, there must be another way of doing this , seems convoluted
Any suggestion would be helpful
Thank you
I have a SQL file which the data changes depending on the use of the program. I initially thought that Save Map would work but there is no List of Maps unless I save a list of maps, but then I saw, saveList is converted to text.
Would it be better to Convert the list of maps to a string array and then saved as bytes ?
My SQL database has 40 fields and depending on which config is required will be the one loaded up.
I made a small test that works, there must be another way of doing this , seems convoluted
B4X:
Dim listofmaps As List
listofmaps.Initialize
map.Put("test1","Firsttest")
map.Put("test2","Second Test")
listofmaps.Add(map)
map.Initialize
map.Put("test1","thirdtest")
map.Put("test2","fourth Test")
listofmaps.Add(map)
Dim abc() As Byte = raf.ConvertObjectToBytes(listofmaps)
File.WriteBytes(File.DirApp,"mylist.led",abc) ' to -Hard Drive
Dim listmaps() As Byte = File.ReadBytes(File.DirApp,"mylist.led") 'From Hard Drive
Dim listmap As List = raf.ConvertBytesToObject(listmaps)
For x = 0 To listmap.Size-1
Dim pma As Map = listmap.Get(x)
For i = 0 To pma.Size - 1
Log("Key: " & pma.GetKeyAt(i))
Log("Value: " & pma.GetValueAt(i))
Next
Next
Any suggestion would be helpful
Thank you
Last edited: