Solved

DataRelation Object vs. INNER JOIN

Posted on 2004-10-21
855 Views
Last Modified: 2008-02-01
Being new to C# (about 1 week), I saw that there is a DataRelation object in ADO.Net.  From what I have gathered so far is that one can add multiple tables into a DataSet and use the DataRelation object to establish the relationship between the tables inside the same DataSet.  

Now, what I am wondering is:  Isn't that what inner joins are for?  If so, when would one use a DataRelation Object as opposed to an INNER JOIN?

Thanks

0
Question by:brdrok
    4 Comments
     
    LVL 20

    Expert Comment

    by:TheAvenger
    Inner joins are used in selects inside the database. In most cases the two tables have also a relation, but this is not obligatory.

    The relationship object shows a relation in your dataset. Based on this relation you can programmatically get all child records or the parent record in this relation, however all objects must be pre-loaded from the database.
    0
     
    LVL 7

    Author Comment

    by:brdrok
    thanks a lot....i suppose one uses the datarelation object when, for example, showing the parent-child(ren) records inside a datagrid?!?

    on a totally different subject (if you need more points, let me know)....

    if one has applied the rowFilter and filtered the dataset according to whatever specifications....is there a method that will allow the programmer (me in this case hehehehe....) to restore the default/original view w/o having to clear and "re-load" the dataset?

    thanks

    0
     
    LVL 20

    Accepted Solution

    by:
    Just set the RowFilter to null - this will clear it
    0
     
    LVL 7

    Author Comment

    by:brdrok
    cool beans...thanks...
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone. Privacy Policy Terms of Use

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Suggested Solutions

    Title # Comments Views Activity
    updating table in entity model 3 20
    .net Return Value error 4 26
    c# combobox autocomplete behavior 6 38
    WiX Installer 2 22
    Article by: Najam
    Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
    Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
    This video Micro Tutorial is the first in a two-part series that shows how to create and use custom scanning profiles in Nuance's PaperPort 14.5 (http://www.experts-exchange.com/articles/17490/). But the ability to create custom scanning profiles al…
    This video Micro Tutorial is the second in a two-part series that shows how to create and use custom scanning profiles in Nuance's PaperPort 14.5 (http://www.experts-exchange.com/articles/17490/). But the ability to create custom scanning profiles a…

    875 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now