473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

loading dataset with a XML

Hello, i have a string with a XML inside, but when a try lo load a dataset
with the next code.

Dim all As String = Webservice.getName(TextName.Text, TextNo2.Text).ToString
'this webmethod return a string wit a XML inside
Dim xmlreader As New System.IO.StringReader(all)
Dim datas As New DataSet
datos.ReadXml(xmlarchivo)

I have the next error
the same table can`t be the table secondary in two relations nested

For some XML i Dont`t have any problem, i can load the xml to a datased, but
for this webmethod don't.

maybe my method is not good? there is other way more eficient?

Thanks
Nov 12 '05 #1
3 1392
On Mon, 14 Mar 2005 15:20:55 -0400, Mauricio Correa L. wrote:
the same table can`t be the table secondary in two relations nested


This is complaining about xml that looks like this:

<FRUIT>
<APPLE>
<WORM />
</APPLE>
<PEAR>
<WORM />
</PEAR>
</FRUIT>

The dataset builder can't create a WORM table, because it found WORM as a
subelement of two different elements.

There's no way around this with datasets, unless you want to transform your
XML to rename one or more of the tags before loading into a dataset.
Nov 12 '05 #2
The XML look like this

<?xml version="1.0" encoding="ISO-8859-1" ?>
<principal>
<basics type="S" >
<email type="F" >oo*@prub.com</email>
</basics >
<advance type="S" >
<email type="F" >xx*@prub.com</email>
</advance >
</principal>

Error "The same table (email) cannot be the child table in two nested
relations"
"Ross Presser" <rp******@imtek.com> escribió en el mensaje
news:za***************@rpresser.invalid...
On Mon, 14 Mar 2005 15:20:55 -0400, Mauricio Correa L. wrote:
the same table can`t be the table secondary in two relations nested
This is complaining about xml that looks like this:

<FRUIT>
<APPLE>
<WORM />
</APPLE>
<PEAR>
<WORM />
</PEAR>
</FRUIT>

The dataset builder can't create a WORM table, because it found WORM as a
subelement of two different elements.

There's no way around this with datasets, unless you want to transform

your XML to rename one or more of the tags before loading into a dataset.

Nov 12 '05 #3
On Mon, 14 Mar 2005 17:05:29 -0400, Mauricio Correa L. wrote:
The XML look like this

<?xml version="1.0" encoding="ISO-8859-1" ?>
<principal>
<basics type="S" >
<email type="F" >oo*@prub.com</email>
</basics >
<advance type="S" >
<email type="F" >xx*@prub.com</email>
</advance >
</principal>

Error "The same table (email) cannot be the child table in two nested
relations"


Yes, your XML fits my description perfectly.

I will repeat what I said previously: There's no way around this with
datasets, unless you want to transform your XML to rename one or more of
the tags before loading into a dataset.
Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Patrick J. Schouten | last post by:
I am trying to transfor an XML document prior to loading into a Dataset. My problem stems from the known bug in Visual Studio that prevents loading a well formed XML because of duplicate child...
0
by: Patrick Kearney | last post by:
Hi All, I have seen this type of question raised in various groups but no one has supplied a definitive answer. I am trying to load a dataset schema that has an xs:include. Project policy is to...
1
by: kids_pro | last post by:
I had come across a code block from Loading a DataSet from XML (.NET Framework Developer's Guide) ---------------------------------------- NOte If you call ReadXML to load a very large file, you...
0
by: timnels | last post by:
I've got a bizzare issue where I have an XML file to load into a data set like: <conversion> <table name="parent"> <table name="child"> </table> </table> <table name="another parent"> ....
3
by: P K | last post by:
Hello, I have a dataset which is already loaded with data in one table. so dataset.tables("data") exists and has data. Now, I have to add another table to the dataset. The source for this...
3
by: KillerJ | last post by:
I found a post about this exact issue: ...
0
by: Ganesh Muthuvelu | last post by:
Hello, What is wrong with this simple schema. When I try to load it to a dataset it gives me an error, "Data type not defined" Thanks. ****************************** <?xml version="1.0"...
0
by: dlutz | last post by:
Good day to all -- I have been trying to load a dataset from XML based on a multi-level schema structure that uses <xsd:importtags to bring other schemas into the XML document context - Schema1...
2
by: shadows206 | last post by:
I am using Visual studio 2003,making aspx page.Whenever I try to drag and drop the Dataset...Just-In-Time Debugging pops up and says .. "An exception 'System.ExecutionEngineException' has occured in...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.