You are not logged in.
Pages: 1
hi,
i setup a TStringList-Value in my Database, which Values are currently shown in Json-Format.
What is the best way, getting those Values back from Database and write them in a local TStringList Variable?
i thought i can do it like this:
fSQLRecord.Liste :=fSQLRecordRec.Liste;
Where fSQLRecordRec is filled with fillone, but the value is nil everytime.
All Other Strings and Integer Values are written in this way.
I searched already for the JSONToObject-function, but i didn't get it working and don't know if it is needed to do like that.
Thanks for your support!
Offline
So I guess your TSQLRecord field is a TStringList.
The instance needs to be initialized before. Try a TRawUTF8List property - which should also be initialized via TSQLRawUTF8List.Create before FillOne.
Or just define a variant - the JSON will be converted into a TDocVariant which is easy to work with.
Check https://synopse.info/files/html/Synopse … ml#TITL_26
Offline
So I guess your TSQLRecord field is a TStringList.
The instance needs to be initialized before.
Thats the trick!
Thanks for your really quick answer
Offline
Pages: 1