I want to take the record I receive back from the Database and programmatically make it a JSONItem with the column names as the JSON value labels. However, Xojo gives me a NilObjectException when I attempt the following. Why is this?
[code]…
Dim rs As RecordSet = ExecuteSQLRS(SQL)
if rs <> nil then
While not rs.EOF
jItem = new JSONItem
for i As Integer = 0 to rs.FieldCount -1
jItem.Value(rs.IdxField(i).Name) = rs.idxField(i).NativeValue <<<<<<<<<
Next
jItems.Append jItem
rs.MoveNext
Wend
You should look into the new framework json handling over JSONItem. It resolves some issues and is much faster, even if you have to massage the data a bit more.
I think you mean, once you switch over completely to the new framework. The classic framework will be around for a long, long time, if not forever. But yes, that’s what it means.