473,626 Members | 3,276 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Filtering relational dataset tables by parent record

Good morning,

I have a typed dataset with 10 relational, hierarchical tables. I
want to be able to "filter" all the dataset tables based on one parent
record. For instance, let's say I have a dataset that with 10 tables
that contain information about all of the 40 some odd U.S.
presidents. The main parent table would be the "President" table.
The child, grandchild, great-grandchild etc. tables may include
countries the president visited, places he lived, children he had and
where they lived, etc. I want to be able to do something like "Filter
the dataset by LastName='Linco ln'", and then the dataset tables would
just contain all records corresponding to Abraham Lincoln.

I studied the DefaultView and the GetChildRows, but it doesn't seem to
give me what quite what I want, unless I am doing it wrong.

I guess I just want a filtered dataset. Using the example above, I
could filter by Abraham Lincoln and easily populate my controls. The
user can change the data, and refresh the page then I could show a
different president, etc. When it's all over I send my dataset out
for update.

Thanks for the help.

Feb 22 '07 #1
0 1227

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2404
by: Mike | last post by:
Hello, I'm trying to understand how to map hierarchical XML data to relational database tables, but I seem to be missing something. I'm not a database expert, but I know the basics. XML seems so much more intuitive to me, though. Anyway, let me make up an example: Say we have an address book, in XML format, that is to be uploaded by a customer and then mapped into relational database tables. I would start by creating an XML Schema...
4
2624
by: news.online.no | last post by:
In a query, I need too be able to show if a parent record has a child record. Using the query in a combo box too select record in a form. Thanks :)
0
947
by: MajorTom | last post by:
Hello How i know the actual record for a relation from to tables in a dataset, the relarion record are in one datagrid, i need to get the current recod. I use CurrencyManager for the table but is diferent for the relation Please help MajorTom
2
1241
by: Darren Clark | last post by:
I have a data set... in which i need to remove 1 row based on a particaly name eg i have a data set (data) and it has 1 table and N rows.... It has a column name of i want to remove all records where the = 'any' ? how syntacically can i do that?
0
1128
by: Raed Sawalha | last post by:
I have DataSet with two tables constructed as following: 1. the DataSet is initially filled by DataAdapter . 2. a new DataTable is created and filled with data returned by a stored procedure 3. the new DataTable is added to DataSet using DataSet.Table.Add() method 4. Then we build the relation with two DataTables inside DataSet As following: DataRelation oLORelation =...
3
8863
by: Shahriar | last post by:
I am using the following statement to filter a dataset. ds.Tables(0).DefaultView.RowFilter = "ID='" & currentpos & " ' It seems to run fine. My question is since I have a filter set, why is the following loop still goes through every record. How can I achieve a real filter on a dataset? I dont want to create a dataview.
3
2404
by: PAUL | last post by:
Hello, I have 2 datasets I am trying to update. The parent table seems to update fine but when I go update the chiled table I get an error message that says I need a related record in the parent table. However I put some code in to display the key field of each parent table record (parent dataset) and the value I am trying to put into the child table is there. ParentTable ChildTable ID------------------------<...
3
5433
by: fuimens | last post by:
Hi, With mysql-4.0.20, I have a problem inserting data with foreign key references, MySQL saying ERROR 1216: Cannot add or update a child row: a foreign key constraint fails The message is confusing because a parent record in parent table exists !? The "show innodb status; " command prints :
6
1875
by: mike11d11 | last post by:
My program has to tables in it. One is the Accounts table with all personal information and then there is also my Memos table with all the notes for each account. My program displays one record at a time for each account in the dataset table. I now want to show only the notes in the memo file that match with the Accounts table current Account #. I have done some similar to this in Access with a subform linked by account # to account #...
0
8269
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8642
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8368
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7203
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6125
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5576
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4094
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2630
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1815
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.