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!

Multiple table Dataset - Synchronising data

Status
Not open for further replies.

DeanWilliams

Programmer
Feb 26, 2003
236
GB
Hi,

I am new to .NET. I am using VB and have a dataset with 6 tables in it. A child table of the primary table has parameters set on it. This is set by a userform. When the user chooses dates, the relevant table is filtered, but the other tables still display all the original data. How do I synchronise the other tables? I have set up the relationships, but they still don't filter.

Please help.

:)
 
If I'm understanding your problem correctly, you grab everything from the database, then apply a filter to the first table. Then when that filter is applied, you want the related tables to "drop" the unneeded information. Does that sound about right?

If that's the case, you'd need to set up a method to filter the other tables through code. The relationships allow you to mimic the rules that the database would impose.

However, I'd recommend a different approach to getting what you want. By getting all of the information initially, you're really hurting your performance. I would suggest getting a subset of information from your table (enough for the user to make a choice on filters), then do a second query to bring what they want.

For instance, in the case of ordermaster and orderdetail tables. Query the ordermaster detail based on customer number. That will give the user a list of all orders. Then when they choose a ordernumber, do a second query that brings the orderdetail rows into a second table.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top