Add relation''s between table in a data set, DOT NET Programming

How can we add relation's between table in a DataSet?

Dim objRelation As DataRelation

 objRelation=New DataRelation("CustomerAddresses",objDataSet.Tables("Customer").Columns("Custid") ,objDataSet.Tables("Addresses").Columns("Custid_fk"))

objDataSet.Relations.Add(objRelation)

The Relations can be added between "DataTable" objects by using the "DataRelation" object. The  sample code Above is trying to build a relationship between "Customer" and "Addresses" "Datatable" by using the "CustomerAddresses" "DataRelation" object.

Posted Date: 9/24/2012 5:12:39 AM | Location : United States







Related Discussions:- Add relation''s between table in a data set, Assignment Help, Ask Question on Add relation''s between table in a data set, Get Answer, Expert's Help, Add relation''s between table in a data set Discussions

Write discussion on Add relation''s between table in a data set
Your posts are moderated
Related Questions
What is impersonation in ASP.NET? By default, the ASP.NET executes in the security context of a restricted user account on the local machine. Sometimes you require to access ne

What are the difference b/w System.String and System.StringBuilder classes? The System.StringBuilder can have mutable string where a variety of operations can be performed whil

Can you give an example of what might be best suited to place in the application_Start and Session_Start subroutines? Application Start - We can place code to initialize

What are the modes of storing ASP.NET session? 1) InProc: - In InProc mode Session state is stored in the memory space of the Aspnet_wp.exe process. That is the default setti

A Super-hero SharePoint developer with great design skills Project Description: US: Our start-up company prepares a very innovative and cool SharePoint related product with c

What is Post Cache substitution? The Post cache substitution is used when we want to cache the complete page but also require some of the dynamic region inside that cached page

I need Beautiful Chatting Application Project Description: I need a beautiful chatting application created that has both private as well as public chat system. The chatting c

Write the basic syntax of a LINQ query in Visual Basic as well as in C#. In Visual Basic, the basic syntax of a LINQ query begins with the from clause and ends with the Select

What is Full Trust? Your code is permitted to do anything in the framework, meaning that all (.Net) permissions are granted. The GAC has Full Trust because it's on the local HD

I need Professional TELERIK WinForm Project Description: Professional TELERIK Professional assistance in  TELERIK WinForm via remote control. Development WinForm in C #