hot to turn recordset into local array
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!
cadeh posted this at 22:50 — 23rd May 2002.
They have: 33 posts
Joined: Apr 2002
What language?
Abhishek Reddy posted this at 12:07 — 24th May 2002.
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
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.