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?
Define the data provider classes that is supported by ado.net?
What does ado stand for in ado.net?
Is ado.net dead?
Explain how to find the given query is optimised one or not?
What are the advantages of using datalist?
What is the advantage of ado.net?
What are the differences between OLEDB and SQLClient Providers?
What providers does Ado.net uses?
How can we save all data from dataset?
Give an example that shows how to execute a stored procedure in ado.net?
What is microsoft ado.net?
How to generate a single aggregate?
What is ado.net code?
What is ado.net in vb net?