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

What does ole stand for in excel?

596


What are the advantages and drawbacks of using ado.net?

617


What is serialization and de-serialization in .net? How can we serialize the dataset object?

514


What is data view and variable view?

481


What is a datareader object?

575






What is ado.net object model?

510


What is ado.net components?

501


What is Data view?

560


Explian About DataAdapters

582


What is data reader in ado.net?

497


Define data access layer?

528


What is disconnected data?

578


What is difference between ado.net and asp net?

510


What is executequery?

493


What is openquery?

528