How you will set the datarelation between two columns?

Answer Posted / swapna

ADO.NET provides DataRelation object to set relation
between two columns.It helps to enforce the following
constraints,a unique constraint, which guarantees that a
column in the table contains no duplicates and a foreign-
key constraint,which can be used to maintain referential
integrity.

A unique constraint is implemented either by simply setting
the Unique property of a data column to true, or by adding
an instance of the UniqueConstraint class to the
DataRelation object's ParentKeyConstraint.

As part of the foreign-key constraint, you can specify
referential integrity rules that are applied at three
points,when a parent record is updated,when a parent record
is deleted and when a change is accepted or rejected.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to add an aggregate column?

531


What does ado stand for?

518


What is the difference between sqlcommand and sqldataadapter?

499


How to create data relations?

548


What is fill method in ado.net?

541






Can we load multiple tables in a dataset?

542


What is ado recordset?

498


List all the steps in order, to access a database through ado.net?

585


What is the executescalar method?

582


What are the benefits of using of ADO.NET in .NET 4.0?

539


What is ado data control?

521


Why edit is not possible in repeater?

522


What is ado and dao?

530


What is the difference between the clone() and copy() methods of the dataset class?

540


Explain the dataadapter class in ado.net?

663