Hi,

I have a simple three table database in access that records events, athletes and times. I am fine getting data from one table but not sure how to get data from two different tables that relate to each other. For example the Time table has time attributes and a foriegn key athleteID which relates to the athlete table have firstname/surname attributes. I want the form to display both names and thier times for a particular event. Do i need to set up two connection strings and datasets, does anyone know how i do this????

Many thanks

Recommended Answers

All 2 Replies

SQL joins are used to query data from two or more tables, based on a relationship between certain columns in these tables.

You can also design a dataset with PRIMARY/FOREIGN key constraints so it will relate the data, and join that way. However this has somewhat more overhead than the approach adatapost mentioned and is more cumbersome to work with.

Unless you intend on doing complicated upserts from the combined data I would follow adatapost's recommendation and use SQL joins.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.