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
How to retrieve the user id which is provided while windows authentication?
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?)
What is difference between executenonquery and executequery?
How can we save all data from dataset?
Which database is the ado.net?
How to connect and retrieve data from database using dataset
What are dataproviders?
What are the data access namespaces in .NET?
What do you know about ado.net's methods?
Explain the overview of ado.net architecture?
What is a column variable?
What is connection in ado.net?
Which keyword is used to accept variable number of parameters?
What is row state?
What is an example of ordinal data?