j1c wrote:
> Sorry, but I am not sure I completely understand how that works.
>
> Your example gives just what I was looking for, however the content
> between the <option> tags now show both column values as items in the
> drop down.
The array created from GetRows has two dimensions. The first dimension
corresponds to the column number, the second to the row number. To reference
the first column in the first row, you would say
getrowsarray(0,0)
(remember, the indexes are zero-based).
To reference the second column in the first row, you would do say
getrowsarray(1,0)
3rd column, second row:
getrowsarray(2,1)
clear?
I don't know why you're using a nested loop. Assuming you want the data in
the second column to be the value, and the data in the first column to be
the text, this should do what you want:
for irowloop = 0 to ubound(instances, 2)
Response.Write "<option value='" & _
Server.HTMLEncode(instances(1,irowloop)) & "'>"
response.write Server.HTMLEncode(instances(0, irowloop))
response.write("</option>")
next
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
|