Groups | Blog | Home
all groups > dotnet xml > august 2005 >

dotnet xml : The same table 'All' cannot be the child table of two nested relat



Vicki
8/26/2005 7:09:07 AM
Using VS2005 beta 2, I have an xsd provided by a vendor that I want to make
into a strongly typed data set. In VS 2003 the MSDataSetGenerator tool gives
a similar error, which I was told was to be fixed in VS 2005. And in fact
the xsd tool does now correctly process the .xsd and create a .vb for it
which compiles just fine. But at runtime when I try to new the strongly
typed data set, I get the above error.

This schema comes to me from a vendor that has several others that I must
also work with, and is valid according to XMLSpy and other commercial XML
tools, and they all have similar structures that re-use elements and thus
exhibit this behavior. If VS 2005 can not handle these schemas, I am in big
v-kevy NO[at]SPAM online.microsoft.com
8/27/2005 12:00:00 AM
Hi,

According to your description, this issue might be referring to the
following KB articles.

http://support.microsoft.com/?kbid=325696

When the Visual Studio .NET XML Designer tries to generate the Data view of
an XML document, the XML Designer applies the Microsoft ADO.NET schema
inference rules to determine the schema information for the source XML. The
ADO.NET schema inference rules in the original release version of the
Microsoft .NET Framework do not permit a single table to be a child table
in more than one DataRelation object.

So although it might be valid and well-formed in XmlSpy, it is not valid
according to ADO.NET schema inference rules.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
Vicki
8/27/2005 9:18:05 AM
Kevin,

Thanks, but this is not the problem. I have a schema (.xsd) that has been
turned into a strongly typed data set (.vb file created by the xsd tool). I
am trying to new a variable whose type is this strongly typed dataset so that
I can fill it and eventually generate an xml document from the data. But the
new gets down into the generated .vb code and raises the exception you see in
the subject line. There is no xml document involved at all at this point,
just newing a variable.

I realize that the original release of .Net did not handle this type of
relationship in the schema, but I had been lead to believe the VS 2005 would,
and in fact the xsd tool does not give the errors as the MSDataSetGenerator
tool in VS2003 did, and the generated code compiles fine, but at runtime when
I try to new, it fails.

[quoted text, click to view]
v-kevy NO[at]SPAM online.microsoft.com
8/30/2005 8:56:34 AM
Hi,

Thanks for explaining it in detail. Since VS.NET 2005 is still a beta
version now, it may still contain some bugs. In this case, I suggest you
try to report this issue in the following link:

http://lab.msdn.microsoft.com/productfeedback/

Our product team will see it and will respond to you. Thanks you very much
for your feedback!

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
AddThis Social Bookmark Button