View Single Post
  #1 (permalink)  
Old April 21st, 2004, 01:12 PM
morpheus morpheus is offline
Friend of Wrox
 
Join Date: Aug 2003
Location: Halifax, Nova Scotia, Canada.
Posts: 166
Thanks: 0
Thanked 0 Times in 0 Posts
Default Fill a drop down box with table names?

I have an sql database, I want to fill a drop down box with the names of all the tables in my database.

<%
SQLStr="SELECT * FROM INFORMATION_SCHEMA.TABLES"
Set RS=Server.CreateObject("ADODB.Recordset")
RS.Open SQLStr,Application("DBConn"),adOpenKeyset,adLockPe ssimistic,adCmdText
%>

I use this to show all the tables, then I thought I could use this to fill the box

<select name="Table">
<option value="<%RS=("TABLE_NAME")%>"</option>
</select>

It just gives me an empty box :-(, I am not sure if I am even going about this the right way, tell me what you think.

Thanks

__________________
-----------------------------------------------------------
\"Don\'t follow someone who\'s not going anywhere\" John Mason
Reply With Quote