hot to turn recordset into local array

They have: 12 posts

Joined: Mar 2002

I want to create two dynamically linked list boxes. Instead of hardcoding in the arrays to accomplish this, I want their contents to come from a Recordset.

What I need to know is how to turn the Recordset into a local array and then how to create the select lists from the array contents.

Can anyone get me started in the right direction on this?

Thanks!

They have: 33 posts

Joined: Apr 2002

What language?

Abhishek Reddy's picture

He has: 3,348 posts

Joined: Jul 2001

Sounds like ASP (?)

If it is, I think this is how it's done:

arrMyArray = objRS.GetRows

To access a value, use arrMyArray(x,y) where x is the column number (starting 0) and y is the row number (starting 0).

Some links:
http://www.programmersresource.com/articles/getrows.asp
http://www.programmersresource.com/articles/dropdown_query.asp

Wink

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.