[Mono-list] System.Data - CanRemove() is vague

Deepak P N Deepak P N" <deepakparasam@rediffmail.com
4 Apr 2004 02:24:12 -0000


 This is a multipart mime message


--Next_1081045452---0-203.199.83.28-16050
Content-type: text/html;
	charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

<P>=0A&nbsp; <BR>=0AHi everyone,<BR>=0A&nbsp; &nbsp;  <BR>=0A&nbsp; &nbsp; =
 I was trying to implement the CanRemove() method of the DataTableCollectio=
n class.<BR>=0A&nbsp; &nbsp;  The author has checked for foreign keys and a=
lso other possible relations of the all the tables in CURRENT dataset.<BR>=
=0A&nbsp; &nbsp;  1). I guessed the TODO to be =96 Check for relations with=
 tables in other DataSet.&nbsp; But we cannot have relation that spans acro=
ss DataSets[I tried this, it throws an exception].<BR>=0A&nbsp; &nbsp;  2) =
My second guess =96 If BeginInit() has been called on any of the table[ Irr=
espective of whether it is involved in any =93relation=94 in current DataSe=
t ], then that table cannot be removed from the current DataSet until EndIn=
it() is called.<BR>=0A<BR>=0A&nbsp; &nbsp;  And what if the DataTableCollec=
tion does not belong to any DataSet.<BR>=0A<BR>=0ACan anyone please help me=
?<BR>=0A<BR>=0ABest regards,<BR>=0ADeepak.=0A</P>=0A<br><br>=0A<A target=3D=
"_blank" HREF=3D"http://clients.rediff.com/signature/track_sig.asp"><IMG SR=
C=3D"http://ads.rediff.com/RealMedia/ads/adstream_nx.cgi/www.rediffmail.com=
/inbox.htm@Bottom" BORDER=3D0 VSPACE=3D0 HSPACE=3D0 HEIGHT=3D74 WIDTH=3D496=
></a>=0A
--Next_1081045452---0-203.199.83.28-16050
Content-type: text/plain;
	charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

 =A0=0AHi everyone,=0A     =0A     I was trying to implement the CanRemove(=
) method of the DataTableCollection class.=0A     The author has checked fo=
r foreign keys and also other possible relations of the all the tables in C=
URRENT dataset.=0A     1). I guessed the TODO to be =96 Check for relations=
 with tables in other DataSet.  But we cannot have relation that spans acro=
ss DataSets[I tried this, it throws an exception].=0A     2) My second gues=
s =96 If BeginInit() has been called on any of the table[ Irrespective of w=
hether it is involved in any =93relation=94 in current DataSet ], then that=
 table cannot be removed from the current DataSet until EndInit() is called=
.=0A=0A     And what if the DataTableCollection does not belong to any Data=
Set.=0A=0ACan anyone please help me?=0A=0ABest regards,=0ADeepak.
--Next_1081045452---0-203.199.83.28-16050--