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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Browsing records from linked tables using 1 navigation object.

Status
Not open for further replies.

PANTLORD

Programmer
Aug 28, 2001
49
0
0
EU
Hi there,

I am new to Delphi DB programming (learnt in Access)so please bear with me. Basically I have two datasource and table components on one form linked by a common key. How can I link my navigation object so that I can peruse both tables on the same key value? My data appears in the form of DBEdit boxes linked to datasources and indexes, as it stands at the minute I have to link my navigation object to one or other of my main datasources, resulting in the controls linked to the other not displaying anything.
Sorry this is probably a dumb question any ideas how to remedy it?

Thanks
PL
 
If you read the help on the TQuery.Datasource property, that explains how to automatically fill parameters from another dataset. This will work if what you want to do is have Dataset B change when a different key is selected in Dataset A.

However, if you want to always show all of the records in both datasets in a grid, this won't work. I don't think there is a way to control two full datasets with one navigator.

TealWren
 
Are your tables a master-detail relationship? For instance if you click on a master table record ( for instance, customer) all the details (such as orders) for that cusotomer will also be displayed?
 
I pretty much thought I had it set up Master-Detail. When creating the tables I had a common key field called MemID and I was just using this. It is a 1-1 relationship. My sub-table records didn't get displayed though, must have been doing somthing wrong.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top