Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 98483
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T00:12:17+00:00 2026-05-11T00:12:17+00:00

I have two tables in a DataSet where the ID field on each is

  • 0

I have two tables in a DataSet where the ID field on each is the same. I have a Relation between the two tables. How do I, in C# code, pull the info from Table2 that relates to the info on Table1?

I have tried using a new DataRow and assigning it by using GetChildRow, but for some reason I cannot seem to make it work.

Also, I understand this question may not be that informative, let me know and I will try to provide more clarification.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T00:12:17+00:00Added an answer on May 11, 2026 at 12:12 am

    The answer is different (and significantly easier) if your DataSet is strongly-typed (i.e. generated from a .xsd file). I’ll assume that’s not the case below, but if it is speak up.

    For generic DataSet objects, the answer largely depends on what you have hold of to start. If you have simply an ID, then it’s probably simplest to use the ID in a select on the relevant DataTable. This will work for either (or both) tables as it will return an array of DataRows with the information you’re looking for.

    If you have a parent DataRow (and it seems likely that you do), then the best method to use depends on the relationship—i.e. which is the parent. If Table1 is your parent and you want to navigate to relevant Table2 child rows, you’re looking for GetChildRow (best to be as specific as you can in telling it which relation to follow). If Table2 is the parent and you’re navigating from a Table1 DataRow to the parent in Table2, you’ll want to use GetParentRow (again, be as specific in identifying the relation as you can—use the relation object if you have it handy).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a dataset that has two tables in it. I want to do
Suppose I have a dataset with those two immortal tables: Employee & Order Emp
I have two tables that are joined together. A has many B Normally you
I have two tables, one that contains volunteers, and one that contains venues. Volunteers
I have two tables, Book and Tag , and books are tagged using the
We have two Tables: Document: id, title, document_type_id, showon_id DocumentType: id, name Relationship: DocumentType
I have two tables, both with start time and end time fields. I need
I have two tables containing Tasks and Notes, and want to retrieve a list
I have two tables in my database, called ratings and movies . Ratings: |
DESCRIPTION I have two datasets with information that I need to merge. The only

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.