Click to See Complete Forum and Search --> : array


swstos
04-15-2003, 09:38 PM
hi...

i have an array with 11 records.

since number of records is 11
rec = numberofrecords/2 + 0.5
rec = 6

What shall i write in order to display the value that is in the 6th record?

Thanks in advance...

swstos
04-15-2003, 10:01 PM
it is an array.

ASP/VBScript

myarray = objRS.GetRows()
numberofrecords = UBound(myarray,2) + 1

rec = numberofrecords/2 + 0.5

since number of records is 11 rec = 6

and now i want to display the value that is in the 6th record but i dont know how?

Thanks for the help...

Nicodemas
04-16-2003, 01:34 AM
Response.Write(myarray(1,5))


That ought to be correct only due to the fact that all arrays start at zero.
The first number indicates how many records to copy, -1 will grab all records.
The second number indicates what recordnumber to start on