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
Explain how to bind the controls(best practice) comboboxes to the data in the dataset?
How do you implement locking concept for dataset?
Explain how to copy the contents from one table to another table and how to delete the source table in ado.net?
Do we use stored procedure in ADO.Net?
What is ado code?
Which method is used to sort the data in ADO.Net?
What are the usages of the command object in ado.net?
What is the difference between Optimistic and Pessimistic locking?
What is the DataTableCollection?
What is fill method in ado.net?
What is the use of data grid?
Explain which name space is used to get assembly details?
Which database is the ado.net sql connection object designed for?
What is disconnected data?
How to creating a SqlCommand Object?