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 difference between datagridview and datagrid control in winforms?
What is difference between executequery and executeupdate?
What is ado.net in vb net?
What is partial class?
How to find the given query is optimised one or not?
What are the major challenges in accessing data from a database?
What is a dynaset in access?
What is the DataTableCollection?
What is the procedure to call a Stored Procedure of Back End in ADO (ActiveX Data Object) and RDO (Remote Data Objects)?
What is the difference between the clone() and copy() methods of the dataset class?
Describe briefly an ADO.NET Dataset ?
Explain how to pass multiple tables in datasets simultaneously?
What is ado object model?
What is openrowset?
What are dataproviders?