Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADO.net and visual .net

Status
Not open for further replies.

KevoMee

Technical User
Apr 30, 2002
72
IE
Hi,

I've created my dataset the visual studio.net (as in you drag the tables across, configure the adapters and generate the dataset). I'm wondering whether the studio includes all the foreign key constraints that exist in the tables? I'm asking this because when I try to use the [child] or [parent] in the select I get an error back saying the column does not exist.

I've also tried to map relations to each other in VS.net (in the xsd file) and an error comes back when trying to run it saying the constraint already exists??????

Thanks anyway for any help.
Kev.
 
As far as I know, you have to explicitly create the dataRelation objects yourself, specifying the parent and child tables.

To this, you can add constraint objects (uniqueConstraint, ForeignKeyConstraint, ChildKeyConstraint, etc...), too.

It can get pretty complicated pretty quickly, so here's a jumping point for you from msdn. The article is an intro to the concept, with many links from it to drill down deeper into the specific objects and how to use them. These examples are done programmatically, however.


:)
paul
penny1.gif
penny1.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top