DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Greg Busby Guest

    C#/DotNet equivalent of DED


    I'm trying to make a hierarchical recordset (like I can do in VB6 using the
    Data Environment Designer -- DED). However, everytime I try to configure
    a DataSet the thing throws up on me. I have two tables that have compound
    primary keys. The first table is the master parent table and has keys A
    & B of which A is the foreign key into the second table, the child table,
    that has keys A, C & D. So I'm trying to create a relationship between the
    two tables using key A. Apparently, C#'s (DotNet's) DataSet does not like
    this at all. How do you create a parent and child command in this language/environment
    similar to what we did in VB6 with the DED? I know there must be a simple
    solution -- I'm just not getting it. Thanks in advance for any and all assistance.

    Greg

  2. #2
    Jay B. Harlow [MVP - Outlook] Guest

    Re: C#/DotNet equivalent of DED

    Greg,
    Are you doing this manually in your code?

    Or are you using the XML Schema editor by adding a new DataSet to your
    project?

    Part of the problem maybe that it sounds like you really a relationship
    between 3 tables!

    Table1 keys = A
    Master keys = A & B
    Child keys = A, C & D

    You can then create a relationship between Table1 & Master, and between
    Table1 & Child.

    As I understand that the DataRelation requires fully qualified keys when you
    are defining the relationships, so you cannot create a relationship between
    Master & Child, as there is no corresponding B key in Child.

    David Sceppa's book "Microsoft ADO.NET - Core Reference" from MS Press
    covers DataSets and every thing else ADO.NET, there is a complete chapter on
    DataRelation objects. Well worth the purchase.

    Hope this helps
    Jay

    "Greg Busby" <gbusby@lagniappesoftware.com> wrote in message
    news:3f947d42$1@devx7.web.devx.com...
    >
    > I'm trying to make a hierarchical recordset (like I can do in VB6 using

    the
    > Data Environment Designer -- DED). However, everytime I try to configure
    > a DataSet the thing throws up on me. I have two tables that have compound
    > primary keys. The first table is the master parent table and has keys A
    > & B of which A is the foreign key into the second table, the child table,
    > that has keys A, C & D. So I'm trying to create a relationship between

    the
    > two tables using key A. Apparently, C#'s (DotNet's) DataSet does not like
    > this at all. How do you create a parent and child command in this

    language/environment
    > similar to what we did in VB6 with the DED? I know there must be a simple
    > solution -- I'm just not getting it. Thanks in advance for any and all

    assistance.
    >
    > Greg




  3. #3
    Greg Busby Guest

    Re: C#/DotNet equivalent of DED


    Jay,

    Thanks for the reply. I was trying to use the wizrds and visual tools in
    VS.Net 2003. I think you're right about needing to renormailze my tables.
    In VB6, I could get away with the DB schema I currently have; but, VS.Net
    2003 is not accepting it. It is balking at missing B key in the child tables.

    Greg

    "Jay B. Harlow [MVP - Outlook]" <Jay_Harlow@email.msn.com> wrote:
    >Greg,
    >Are you doing this manually in your code?
    >
    >Or are you using the XML Schema editor by adding a new DataSet to your
    >project?
    >
    >Part of the problem maybe that it sounds like you really a relationship
    >between 3 tables!
    >
    >Table1 keys = A
    >Master keys = A & B
    >Child keys = A, C & D
    >
    >You can then create a relationship between Table1 & Master, and between
    >Table1 & Child.
    >
    >As I understand that the DataRelation requires fully qualified keys when

    you
    >are defining the relationships, so you cannot create a relationship between
    >Master & Child, as there is no corresponding B key in Child.
    >
    >David Sceppa's book "Microsoft ADO.NET - Core Reference" from MS Press
    >covers DataSets and every thing else ADO.NET, there is a complete chapter

    on
    >DataRelation objects. Well worth the purchase.
    >
    >Hope this helps
    >Jay
    >
    >"Greg Busby" <gbusby@lagniappesoftware.com> wrote in message
    >news:3f947d42$1@devx7.web.devx.com...
    >>
    >> I'm trying to make a hierarchical recordset (like I can do in VB6 using

    >the
    >> Data Environment Designer -- DED). However, everytime I try to configure
    >> a DataSet the thing throws up on me. I have two tables that have compound
    >> primary keys. The first table is the master parent table and has keys

    A
    >> & B of which A is the foreign key into the second table, the child table,
    >> that has keys A, C & D. So I'm trying to create a relationship between

    >the
    >> two tables using key A. Apparently, C#'s (DotNet's) DataSet does not

    like
    >> this at all. How do you create a parent and child command in this

    >language/environment
    >> similar to what we did in VB6 with the DED? I know there must be a simple
    >> solution -- I'm just not getting it. Thanks in advance for any and all

    >assistance.
    >>
    >> Greg

    >
    >



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links