dim rArray(9) <-- Assumes that there are always 9 fields
sql = "select rate from mort"
set recset = adocon.execute(sql)
do while (not recset.eof)
for i=0 to recset.fields.count-1
rArray(i)= recset(i) <-- Sets rArray(i) to recset(i). This happens, for 0 to recset.fields.count -1, for each record. In other words, rArray in the end contains only the data from the last recordset
next <-- Yes, i is incremented...handle the next of the fields
recset.moveNext
loop <-- handle the next record
response.write rArray(0) <-- The first field of the last record. See above.
You are copying the data from one array to another for each record and only returning the copied data after it has been overwritten several times.