I've studied your code, and I wonder if you could add new methods and properties in order to give the chance to the user to assign the name of the property "data". You always can have "data" as "default".
' Load properties from a ADO RecordSet object
public sub LoadRecordSet(byref rs)
LoadRecordSet2 rs, "data"
end sub
' Load properties from a ADO RecordSet object
public sub LoadRecordSet2(byref rs, prop)
dim arr, obj, field
set arr = new JSONArray
while not rs.eof
set obj = new JSONobject
for each field in rs.fields
obj.Add field.name, field.value
next
arr.Push obj
rs.movenext
wend
set obj = nothing
add prop, arr
end sub
I've studied your code, and I wonder if you could add new methods and properties in order to give the chance to the user to assign the name of the property "data". You always can have "data" as "default".
' Load properties from a ADO RecordSet object public sub LoadRecordSet(byref rs) LoadRecordSet2 rs, "data" end sub