Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Array and a Recordset Question Hi

Status
Not open for further replies.

Ecreations

Programmer
Jul 6, 2002
220
CA
Array and a Recordset Question
Hi guys
i have a recordset returning one field
I want it to return an array of that field
i know about GetRow but i want to use an array
now i got this far but keep getting errors

Do While Not rs.EOF
ReDim Preserve MyArray(x)
MyArray(x) = rs("Title")
rs.MoveNext
x = x + 1
loop

any help would be greatly appreciated
 
what error are you getting?


Tony
reddot.gif WIDTH=500 HEIGHT=2 VSPACE=3

 
Are you declaring the var. first?

dim MyArray

Do While Not rs.EOF
ReDim Preserve MyArray(x)
MyArray(x) = rs("Title")
rs.MoveNext
x = x + 1
loop
 
Thanx for the response guys
it was all of course my fault. i was trying to use the results in a client side javascript thats expecting a string var /DUH/, after afew slaps on the forehead i used the forgotten join function to make the asp array a string and send to the client javascript.
all of that coz Mr nextscape doesnt suport the Marquee and i wanted to make the script compatible on both IE, and Netscape.
the script is actually an asp news scroller



The solution is simple, the problem is complex.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top