Elvellon
06-23-2006, 02:34 PM
Hi there!
I'm fairly new to ASP, and am kinda stuck on this problem:
I'm creating a website that has to include a database. The database has to have two tables (one with information on "Places to go" and the other table to store images relating to those places). The tables in the database must be related and I have to then generate two SQL statements as listed below:
One query to extract information on "Rainforests and Mountains"
One query to extract information on "Unique Wonders"
Setting up the database was the easy bit, the part I'm stuck on is trying to pull across the information that I need in an ASP page.
I want the records to display in a table (just a simple one for now). I need the following fields to be included in that table:
Place (from tbl_places)
State (from tbl_places)
City (from tbl_places)
Information (from tbl_places)
Image (from tbl_images)
I've tried generating the SQL in the database and copying and pasting it into my code, but it just won't have a bar of it.
I'm using an ODBC connection, and there's nothing wrong with it as I'm able to display all records in one table easily enough, it's just when I try to pull across information from two tables that I run into trouble.
If anybody has any idea on how to acomplish this I'd be forever grateful. I've included the database and one ASP page (with my coding) as an attachment.
Thanks for taking the time to read this!
I'm fairly new to ASP, and am kinda stuck on this problem:
I'm creating a website that has to include a database. The database has to have two tables (one with information on "Places to go" and the other table to store images relating to those places). The tables in the database must be related and I have to then generate two SQL statements as listed below:
One query to extract information on "Rainforests and Mountains"
One query to extract information on "Unique Wonders"
Setting up the database was the easy bit, the part I'm stuck on is trying to pull across the information that I need in an ASP page.
I want the records to display in a table (just a simple one for now). I need the following fields to be included in that table:
Place (from tbl_places)
State (from tbl_places)
City (from tbl_places)
Information (from tbl_places)
Image (from tbl_images)
I've tried generating the SQL in the database and copying and pasting it into my code, but it just won't have a bar of it.
I'm using an ODBC connection, and there's nothing wrong with it as I'm able to display all records in one table easily enough, it's just when I try to pull across information from two tables that I run into trouble.
If anybody has any idea on how to acomplish this I'd be forever grateful. I've included the database and one ASP page (with my coding) as an attachment.
Thanks for taking the time to read this!