Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Frontpage and SQL

Status
Not open for further replies.

Alastor

MIS
Aug 27, 1998
36
US
I have a database that I am displaying through Frontpage. The database contains several tables that have the exact same format but contain different information. I want to be able to have a dropdown list that I can select a table from and then have that table displayed(on that page or on a new page) when I click on the Select button. I know I can do it by having a seperate .asp page for each table but I would like to be able to modify the SQL query for each table. Any help would be appreciated.
 
Alastor,<br>
Have you tried using frames?<br>
You could have a top or left frame w/ the drop-down box and then load the other asp page in the other frame. It would then give you the allusion of loading on the same page<br>
Just a thought??
 
That's not exactly my problem. I want to pass a variable containing the table name from the combo box to the SQL query. That way I can have one .asp page that will query whatever table is selected instead of having eight different queries and eight different .asp pages. Any ideas?
 
hey shortcutkid... your suggestion for alastor sounds like a visual shortcut, but what about download time? alastor, i am researching your problem right now
 
Thanks Rebecca. Any ideas you can come up with will be greatly appreciated.
 
Go into the HTML itself, find the SQL setup area. Simply change the FROM area to a variable (which is the value of the dropdown box). ie<br>
Was 'Select * from Table-name'<br>
Now 'select * from ' & dropdown.value<br>
<br>
This was each time the form is submitted, the sql will be reset and since the grid is displayed based on the underlying recordset, nothing else needs to be changed..<br>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top