Hi,
I'm trying to read a query and use subscript to add multiple members to an array. I know I can use file to array but I'm curious if there is a way to dynamically add the subscript?
Here is my code why doesn't seem to work. What I'd like is to have the subscript variable "nTripCounter" update for each record I read.
vListTrips is Variant
nTripCounter is int
HExecuteQuery(Query_Trip_WebBooking,hQueryDefault)
HReadFirst(Query_Trip_WebBooking)
WHILE not HOut(Query_Trip_WebBooking)
nTripCounter=nTripCounter+1
vListTrips.trip[nTripCounter].tripCode=Query_Trip_WebBooking.Trip_Code
vListTrips.trip[nTripCounter].tripID=Query_Trip_WebBooking.TripID
vListTrips.trip[nTripCounter].tripName=Query_Trip_WebBooking.tripName
HReadNext(Query_Trip_WebBooking)
END
sResultJson is string=VariantToJSON(sResultJson)
RESULT sResultJson
Thanks!