DataSet can't determine 'childs'

  • Thread starter Egbert Nierop \(MVP for IIS\)
  • Start date
E

Egbert Nierop \(MVP for IIS\)

Is it true that XML in this form is **unusable** for usage by
DataSet.ReadXml([file], XmlReadMode.Fragment) and
[DataRow][DataColumn].GetChildRows()?

Because I found that GetChildsRows() does not work. I am talking about a
DataSet which has a xsd schema.
Im suspecting currently, that GetChildRows -only- works if there is a
primarykey-foreign key relation ship.

I DO want to avoid to use the XmlDocument object to read all data! Is there
an easy fix for this?

The child(s) here is <option>

<entry>
<value>blah</value>
<entries>
<option>1</option></option>2</option>
</entries>
</entry>
 
E

Egbert Nierop \(MVP for IIS\)

Ben Strackany said:
I believe you will still have to define a relationship in the dataset.

I have an other dataset, which has a normal schema (without relationships)
which works. Only the schema created from the XML showed in OP does not seem
to have effect on subchilds being related to a parent element.
--
Ben Strackany
www.developmentnow.com

<a href="http://www.developmentnow.com">dn</a>


Egbert Nierop (MVP for IIS) said:
Is it true that XML in this form is **unusable** for usage by
DataSet.ReadXml([file], XmlReadMode.Fragment) and
[DataRow][DataColumn].GetChildRows()?

Because I found that GetChildsRows() does not work. I am talking about a
DataSet which has a xsd schema.
Im suspecting currently, that GetChildRows -only- works if there is a
primarykey-foreign key relation ship.

I DO want to avoid to use the XmlDocument object to read all data! Is there
an easy fix for this?

The child(s) here is <option>

<entry>
<value>blah</value>
<entries>
<option>1</option></option>2</option>
</entries>
</entry>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top