PC Review


Reply
Thread Tools Rate Thread

How DataRelation object is updated

 
 
=?Utf-8?B?REh1YW5n?=
Guest
Posts: n/a
 
      24th Jun 2005
After the VS 2003 creates a strongly typed DataSet object that contains a
couple of tables and serveral many-to-may data relations among all the
tables, and the data got populated, I am wonder how the DataRelation object
of the DataSet object is updated when some new rows are added to some of the
tables. Do I have to update the relation of the added rows or in somewhere
the relations are added automatically? Can someone explain this for me or
point me to some resources?

Thanks a lots.

 
Reply With Quote
 
 
 
 
Miha Markic [MVP C#]
Guest
Posts: n/a
 
      24th Jun 2005
hi,

What do you mean by updating the relation?

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/
SLODUG - Slovene Developer Users Group www.codezone-si.info

"DHuang" <(E-Mail Removed)> wrote in message
news:21F5BC51-5C60-4131-854E-(E-Mail Removed)...
> After the VS 2003 creates a strongly typed DataSet object that contains a
> couple of tables and serveral many-to-may data relations among all the
> tables, and the data got populated, I am wonder how the DataRelation
> object
> of the DataSet object is updated when some new rows are added to some of
> the
> tables. Do I have to update the relation of the added rows or in somewhere
> the relations are added automatically? Can someone explain this for me or
> point me to some resources?
>
> Thanks a lots.
>



 
Reply With Quote
 
=?Utf-8?B?REh1YW5n?=
Guest
Posts: n/a
 
      25th Jun 2005
Say, I have two related tables that are populated to a stringly typed DataSet
object (created by Visual Studio 2003), including their relationship (foreign
key). So that I have a DataSet object that contains two DataTable objects and
at least a DataRelationCollection object, and some others. If I add two new
and related rows, one to each table, I expect that a new relation object is
add autmoatically to the DataRelationCollection object by some mechanism also
generated the VS 2003, but not by some logics that have to be written by
myself. I just want to confirm this because I could not find an explanation
of how to handle data relation within (strongly typed) DataSet from MSDN
library. Did I explain this clearly? Thanks.

"Miha Markic [MVP C#]" wrote:

> hi,
>
> What do you mean by updating the relation?
>
> --
> Miha Markic [MVP C#] - RightHand .NET consulting & development
> www.rthand.com
> Blog: http://cs.rthand.com/blogs/blog_with_righthand/
> SLODUG - Slovene Developer Users Group www.codezone-si.info
>
> "DHuang" <(E-Mail Removed)> wrote in message
> news:21F5BC51-5C60-4131-854E-(E-Mail Removed)...
> > After the VS 2003 creates a strongly typed DataSet object that contains a
> > couple of tables and serveral many-to-may data relations among all the
> > tables, and the data got populated, I am wonder how the DataRelation
> > object
> > of the DataSet object is updated when some new rows are added to some of
> > the
> > tables. Do I have to update the relation of the added rows or in somewhere
> > the relations are added automatically? Can someone explain this for me or
> > point me to some resources?
> >
> > Thanks a lots.
> >

>
>
>

 
Reply With Quote
 
Massimo
Guest
Posts: n/a
 
      25th Jun 2005
"DHuang" <(E-Mail Removed)> ha scritto nel messaggio
news:9226A749-DD2B-40BA-847B-(E-Mail Removed)...

> Say, I have two related tables that are populated to a stringly typed
> DataSet
> object (created by Visual Studio 2003), including their relationship
> (foreign
> key). So that I have a DataSet object that contains two DataTable objects
> and
> at least a DataRelationCollection object, and some others. If I add two
> new
> and related rows, one to each table, I expect that a new relation object
> is
> add autmoatically to the DataRelationCollection object by some mechanism
> also
> generated the VS 2003, but not by some logics that have to be written by
> myself. I just want to confirm this because I could not find an
> explanation
> of how to handle data relation within (strongly typed) DataSet from MSDN
> library. Did I explain this clearly? Thanks.


A DataRelation object links two tables, not their rows one-by-one. You must
not add new DataRelations everytime you add a row to a table.

Massimo

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing the word "Updated" from the object of an updated meeting? multic@hotmail.com Microsoft Outlook 0 25th Jan 2006 12:29 PM
Help: DataRelation object =?Utf-8?B?c2VyZ2UgY2FsZGVyYXJh?= Microsoft Dot NET 3 31st Mar 2005 03:10 PM
Determining how and why an object was updated. David Slinn Microsoft Windows 2000 Active Directory 4 24th Nov 2004 03:51 PM
Help!!! DataRelation with "Object Reference" Erro Blacktongue Microsoft ADO .NET 1 7th Jun 2004 04:53 AM
Join Tables without DataRelation object Steve Bishop Microsoft Dot NET Framework 1 28th Apr 2004 09:12 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:53 AM.