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

Deepak P N Deepak P N" <deepakparasam@rediffmail.com
31 Mar 2004 14:06:56 -0000


 This is a multipart mime message


--Next_1080742016---0-203.199.83.32-8059
Content-type: text/html;
	charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

<P>=0AHi everyone,<BR>=0A&nbsp; &nbsp; &nbsp;<BR>=0A&nbsp; &nbsp; &nbsp;I w=
as trying to implement the CanRemove() method of the DataTableCollection cl=
ass.<BR>=0A&nbsp; &nbsp; &nbsp;The author has checked for foreign keys and =
also other possible relations of the all the tables in CURRENT dataset.<BR>=
=0A&nbsp; &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=
 across DataSets[I tried this, it throws an exception].<BR>=0A&nbsp; &nbsp;=
 &nbsp;2) My second guess =96 If BeginInit() has been called on any of the =
table[ Irrespective of whether it is involved in any =93relation=94 in curr=
ent DataSet ], then that table cannot be removed from the current DataSet u=
ntil EndInit() is called.<BR>=0A<BR>=0A&nbsp; &nbsp; &nbsp;And what if the =
DataTableCollection does not belong to any DataSet.<BR>=0A<BR>=0ACan anyone=
 please help me?<BR>=0A<BR>=0ABest regards,<BR>=0ADeepak.<BR>=0A<BR>=0A<BR>=
=0A<BR>=0A=0A</P>=0A<br><br>=0A<A target=3D"_blank" HREF=3D"http://clients.=
rediff.com/signature/track_sig.asp"><IMG SRC=3D"http://ads.rediff.com/RealM=
edia/ads/adstream_nx.cgi/www.rediffmail.com/inbox.htm@Bottom" BORDER=3D0 VS=
PACE=3D0 HSPACE=3D0 HEIGHT=3D74 WIDTH=3D496></a>=0A
--Next_1080742016---0-203.199.83.32-8059
Content-type: text/plain;
	charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hi everyone,=0A	=0A	I was trying to implement the CanRemove() method of the=
 DataTableCollection class.=0A	The author has checked for foreign keys and =
also other possible relations of the all the tables in CURRENT dataset.=0A	=
1). I guessed the TODO to be =96 Check for relations with tables in other D=
ataSet.  But we cannot have relation that spans across DataSets[I tried thi=
s, it throws an exception].=0A	2) My second guess =96 If BeginInit() has be=
en called on any of the table[ Irrespective of whether it is involved in an=
y =93relation=94 in current DataSet ], then that table cannot be removed fr=
om the current DataSet until EndInit() is called.=0A=0A	And what if the Dat=
aTableCollection does not belong to any DataSet.=0A=0ACan anyone please hel=
p me?=0A=0ABest regards,=0ADeepak.=0A=0A=0A=0A
--Next_1080742016---0-203.199.83.32-8059--