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

Explain how can we load multiple tables in to dataset?

724


If we are not returning any records from the database, which method is to be used?

1035


Explain ado.net features?

815


Which one of the objects is a high-level abstraction of the connection and command objects in ado.net?

913


What is Serialization in .NET? what are the types of Serialization?

814


What is the role of clr?

751


how can implement dropdownlist in particular of dataset when try to update?

2554


What are the Features and disadvantages of dataset

805


What is ole access?

733


What is connection pooling and what is the maximum pool size in ado.net connection string?

743


What does executequery return?

735


How can I retrieve two tables of data at a time by using data reader? Data reader read and forward only, how is it possible to get 2 tables of data at a time?

752


Explain how to find the given query is optimised one or not?

738


Why do we need ado.net?

754


What is oledb connection?

743