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 serialization and de-serialization in .net?

898


Define atomicity?

987


What is the advantage of ado.net?

980


Which architecture does Datasets follow?

1005


What are the advantages of oledb compared with other classes?

2766


What is basic use of data view?

959


How will you differentiate between ADO (ActiveX Data Object) and RDO (Remote Data Objects)?

992


What is the meaning of executenonquery?

997


What is the difference between ADO and ADO.Net?

1044


Which database is the ado.net?

936


What Is Difference Between Ado And Ado.net?

1001


What is oledb connection?

955


What we do with the object of ado.net dataset after using it?

980


How to load multiple tables into a dataset?

1018


How can you add or remove rows from the datatable object of dataset?

992