Hello,
I have a TEXT field in the database. I am storing a MAP in this text field.
It is storing the MAP fine. However, I can't convert this text into a MAP object, when I load the field from the database again.
I have also tried converting the text to JSON and then assigning it to map, which also didn't work.
Can anyone please help me?
I have a TEXT field in the database. I am storing a MAP in this text field.
It is storing the MAP fine. However, I can't convert this text into a MAP object, when I load the field from the database again.
B4X:
dim data as string
dim map1 as Map
data = sql1.ExecQuerySingleResult2("SELECT all_operations FROM tblJobs WHERE device_job_id=?", Array As String(device_job_id))
map1 = data
I have also tried converting the text to JSON and then assigning it to map, which also didn't work.
B4X:
dim data as string
dim map1 as Map
dim json as JSONParser
data = sql1.ExecQuerySingleResult2("SELECT all_operations FROM tblJobs WHERE device_job_id=?", Array As String(device_job_id))
json.Initialize(data)
map1 = json.NextObject
Can anyone please help me?