|
-
Apr 8th, 2001, 04:06 PM
#1
Thread Starter
Lively Member
Ok i have a ComboBox on an asp form with three different values in it the values represent table names in my database
ie
LEvelOne
LevelTwo
LevelThree
i want my statement to
"Select * from " & "Combobox"
Select* data from the name of the table????
can this be done and how please im stuck on it???
-
Apr 8th, 2001, 07:35 PM
#2
When you click submit, your combobox is going to pass the selection. Create a variable to hold that selection, and put that variable in the SQL statement for the table. You would have to make a string variable to hold your SQL statement.
Or you could have 3 different SQL statements and use an if statement to decide which one to use by compairing the selected item in the combo box. This would be bad programming though, because you couldn't easily add more table selections in the future.
Stick with the first way if I were you.
Hope that helps.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|