Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Typed dataset and datarelation

Posted on 2004-08-10
6
Medium Priority
?
464 Views
Last Modified: 2012-06-27
Hi Experts,

I build a typed dataset with Visual Studio.
All tables are dynamically generated, so I can use them in my code.

But datarelations don't appear. Is it normal ?
Or the only way is to use .Relation[string relationname] object.

I want to know if a datarelation is built dynamically by VS or not.

Thanks.
0
Comment
Question by:noulouk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 10

Expert Comment

by:eternal_21
ID: 11766654
This is normal.  The DataRelation is built by the MSDataSetGenerator, but declared as private.
0
 
LVL 9

Author Comment

by:noulouk
ID: 11766726
Thanks eternal 21.
So you mean the datarelation isn't generate dynamically and finally the only way is to use .Relation[string relationname] object.
0
 
LVL 10

Accepted Solution

by:
eternal_21 earned 2000 total points
ID: 11766874
The DataRelation *is* generated dynamically, but it is generated as a private variable, and is thus not accessable from outside of the DataSet class.  You are correct that the only way to use it is through the DataSet.Relations property.

It's too bad the Microsoft didn't have the generator create public properties for each of the Relations, as they do for the DataTables!
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 9

Author Comment

by:noulouk
ID: 11766954
I'm agree with you.
Hope it will change in future version.
0
 
LVL 10

Expert Comment

by:eternal_21
ID: 11767136
You could always edit your DataSet.cs file (produced by the generator), and set the Build Action of your DataSet to None (or remove it from your project), and then add your own public properties and methods.
0
 
LVL 10

Expert Comment

by:eternal_21
ID: 11767144
Don't forget to edit your Visual Studio Solution file, so you can see the .cs file in your project!
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

660 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