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
Is entity framework better than ado.net?
Which name space is used to get assembly details?
How can we save all data from dataset?
What is difference between executequery and executeupdate?
What Is Difference Between Ado And Ado.net?
What is the difference between sqlcommand and sqldataadapter?
If a table contains 20000 records . In a page at each time 100 records to be displayed what are the steps you will take to improve performance? Will you use dataset or datareader?
Explain ODP.net
What are all the different authentication techniques used to connect to MS SQL Server?
What is connected architecture in ado.net?
What are the usages of the command object in ado.net?
What is the use of connection object in ado.net?
What provider ado.net use by default? Explain the role of data provider in ado.net?
What is concurrency? How will you avoid concurrency when dealing with dataset? (One user deleted one row after that another user through his dataset was trying to update same row. What will happen? How will you avoid the problem?)
How can we serialize the dataset object?