Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How you will set the datarelation between two columns?

Answer Posted / muthu kumar

DataSet d = new DataSet();
DataColumn parentDC = new
DataColumn(d.Tables["parentTable"].Columns["id"]);
DataColumn childDC = new
DataColumn(d.Tables["ChildTable"].Columns["id"]);
DataRelation ds = new DataRelation("relation name",
parentDC, childDC);
d.Relations.Add(ds);

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between dataset and datatable?

1012


What is difference between sqldatareader and sqldataadapter?

931


How to check if the Dataset has records ?

1008


What are the different namespaces used in the project to connect the database? What data providers available in .net to connect to database?

1338


What is ado rdo dao in visual basic?

1168


how we can fire event in databound coulm in datagfrid withot using button?

972


What is difference between datareader and dataadapter?

1051


What is ole access?

948


What are the Features and disadvantages of dataset

1124


What is the difference between ADO and ADO.Net?

1084


What is a string variable?

917


What is ado net stands for?

970


Why is stored procedure used in ado.net?

1125


How to perform sorting on a table in ADO.NET?

1033


Define Execute Reader?

1069