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 serialization and de-serialization in .net?
Define atomicity?
What is the advantage of ado.net?
Which architecture does Datasets follow?
What are the advantages of oledb compared with other classes?
What is basic use of data view?
How will you differentiate between ADO (ActiveX Data Object) and RDO (Remote Data Objects)?
What is the meaning of executenonquery?
What is the difference between ADO and ADO.Net?
Which database is the ado.net?
What Is Difference Between Ado And Ado.net?
What is oledb connection?
What we do with the object of ado.net dataset after using it?
How to load multiple tables into a dataset?
How can you add or remove rows from the datatable object of dataset?