View Single Post
Old Jan 13th, 2006, 8:22 PM   #1
paulchwd
Hobbyist Programmer
 
paulchwd's Avatar
 
Join Date: Mar 2005
Posts: 139
Rep Power: 4 paulchwd is on a distinguished road
Exclamation Weird result with Arrays ---> please help

Hello all.

Simple concept here..i queryed my database (Access) , stored the resultes in a recordset, as usual

Then i created a loop to put the contents of the recordset into an arry, but it only put one element in it. ..code below

dim rArray(9)

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)


  next

recset.moveNext

loop

response.write rArray(0)

only the final element of the recordset is in the array

did i set up the array right ?

thanks
paulchwd is offline   Reply With Quote