W
Workaholic
Hi,
I am hoping somebody can help me by answering a question about
referential integrity within the DATASET.READXML method. I am trying
to process an XML file that is provided by a third party system, and
am running into some referential integrity problems. I will use a
simple piece of XML as an example.
<XML_DATA>
<MEMBER>
<MEMBER_ID>1</MEMBER_ID>
<MEMBER_NAMES>
<TITLE>MR</TITLE>
<FIRST_NAME>JOE</FIRST_NAME>
<LAST_NAME>BLOGGS</LAST_NAME>
</MEMBER_NAMES>
</MEMBER>
<MEMBER>
<MEMBER_ID>2</MEMBER_ID>
<MEMBER_NAMES>
<TITLE>MRS</TITLE>
<FIRST_NAME>JOSEPHINE</FIRST_NAME>
<LAST_NAME>BLOGGS</LAST_NAME>
</MEMBER_NAMES>
</MEMBER>
</XML_DATA>
I know this XML is pretty poor, but it does nicely explain the issue.
Within this XML, you can see that Member Id "1" is "Mr Joe Bloggs" and
Member Id "2" is "Mrs Josephine Bloggs". The issue for me though is
relating the FIRST_NAME column to the appropriate Member ID...
....If I examine DATASET.TABLES("MEMBER_NAMES").FIRST_NAME I will get a
count of two (element 0 being "Joe" and element 1 being "Josephine").
What I really need is a way to differentiate them.
Can anybody tell me if there is a command similar to:
DATASET.TABLES("MEMBER").ROWS(1).GETCHILDROWS("MEMBER_NAMES").ROWS(0).ITEM("FIRST_NAME")
I have tried this, but GetChildRows always seems to return nothing. I
have been able to use the syntax
DATASET.TABLES("MEMBER").CHILDRELATIONS(0).CHILDTABLE.TABLENAME to
return the value "MEMBER_NAMES", but this doesn't tell me which row in
the sub-table is related to which row in the outer table.
If it makes any difference, I am still using .Net Framework 1.1, but
will be happy to upgrade if that helps me.
Many thanks for your help
I am hoping somebody can help me by answering a question about
referential integrity within the DATASET.READXML method. I am trying
to process an XML file that is provided by a third party system, and
am running into some referential integrity problems. I will use a
simple piece of XML as an example.
<XML_DATA>
<MEMBER>
<MEMBER_ID>1</MEMBER_ID>
<MEMBER_NAMES>
<TITLE>MR</TITLE>
<FIRST_NAME>JOE</FIRST_NAME>
<LAST_NAME>BLOGGS</LAST_NAME>
</MEMBER_NAMES>
</MEMBER>
<MEMBER>
<MEMBER_ID>2</MEMBER_ID>
<MEMBER_NAMES>
<TITLE>MRS</TITLE>
<FIRST_NAME>JOSEPHINE</FIRST_NAME>
<LAST_NAME>BLOGGS</LAST_NAME>
</MEMBER_NAMES>
</MEMBER>
</XML_DATA>
I know this XML is pretty poor, but it does nicely explain the issue.
Within this XML, you can see that Member Id "1" is "Mr Joe Bloggs" and
Member Id "2" is "Mrs Josephine Bloggs". The issue for me though is
relating the FIRST_NAME column to the appropriate Member ID...
....If I examine DATASET.TABLES("MEMBER_NAMES").FIRST_NAME I will get a
count of two (element 0 being "Joe" and element 1 being "Josephine").
What I really need is a way to differentiate them.
Can anybody tell me if there is a command similar to:
DATASET.TABLES("MEMBER").ROWS(1).GETCHILDROWS("MEMBER_NAMES").ROWS(0).ITEM("FIRST_NAME")
I have tried this, but GetChildRows always seems to return nothing. I
have been able to use the syntax
DATASET.TABLES("MEMBER").CHILDRELATIONS(0).CHILDTABLE.TABLENAME to
return the value "MEMBER_NAMES", but this doesn't tell me which row in
the sub-table is related to which row in the outer table.
If it makes any difference, I am still using .Net Framework 1.1, but
will be happy to upgrade if that helps me.
Many thanks for your help