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!

joining two tables in database results.

Status
Not open for further replies.

SirLars

Technical User
Oct 24, 2000
47
CA
I am using front page to create a site with a database containing tables for teachers, classes and locations.

Starts with a drop down form that selects from a table of instructors.

Comes to display instructors "bio page"
now I need to use a field in the instructor table (classes_id) to display the rows in THAT table with have that teachers id and give links to the description of those classes

(i.e.
teacher table: teacher_id, teacher_fname, teacher_lname, teacher_photolink, teacher_bio
class_table: class_id, class_teacher_id, class_location_id, class description
location_table: location_id, location_address, location_directions, location_maplink)

The display_classes.asp page also has to link to the location ID and give a link to a location page. So I need to join the two databases again there.

Trying to put the second database results inside of the database results gives me an error.

namely:

---snip-----
Courses from this instructor: ID=1
Database Results Error
Description: No value given for one or more required parameters.
Number: -2147217904 (0x80040E10)
Source: Microsoft JET Database Engine
---snip----

I am embarrased to say i have simply gotten so rusty with my asp and sql.

Should I be trying to create an sql statement that joins the databases? should I pass the class_id to a variable in the asp page and then use that variable to get the 2nd database results? or is there a proper way to show database results inside of another database results where the KEY for the second database results is a field within the first?

Make any sense?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top