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
What is the difference between dataset and datatable?
What is difference between sqldatareader and sqldataadapter?
How to check if the Dataset has records ?
What are the different namespaces used in the project to connect the database? What data providers available in .net to connect to database?
What is ado rdo dao in visual basic?
how we can fire event in databound coulm in datagfrid withot using button?
What is difference between datareader and dataadapter?
What is ole access?
What are the Features and disadvantages of dataset
What is the difference between ADO and ADO.Net?
What is a string variable?
What is ado net stands for?
Why is stored procedure used in ado.net?
How to perform sorting on a table in ADO.NET?
Define Execute Reader?