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

Which is faster sqldataadapter and sqldatareader?

979


Why is it important to close an ado.net application?

1078


What are the advantages of oledb compared with other classes?

2840


What is a control toolbox?

1022


What are typed and untyped dataset?

1149


How to copy the contents from one table to another table and how to delete the source table in ado.net?

1088


What are the disadvantages of using datalist?

1087


Can we connect two dataadapters to same data source using single connection at same time?

1036


differance between ADO vs ADO.Net?

1133


Explain the advantages and disadvantages of using datalist?

1113


How is it possible to get 2 tables of data at a time by using data reader?

989


What is ado.net components?

1003


What is execute reader in ado.net?

1013


What is the difference between data grid and data repeater?

1139


Explain the role of data provider in ado.net?

1044