PC Review


Reply
Thread Tools Rate Thread

How to add a Row to GetChildRows

 
 
Softwaremaker
Guest
Posts: n/a
 
      22nd Jul 2003
Hi Fellows,

Just a simple question,

I have a table with one row. This row itself has got multiple Child Rows.
Once I retrieve this array of rows using GetChildRows, how do I add a row
into it ?

If I add to the childtable in the dataset
ds.tables(1).Rows.add(dataRow)
and I do a Row Count, it reflects correctly but not in the xml as shown
below
However this row is not added to the ChildRows of the ParentRow of the main
table as evident when I count the rows in the GetChildRows.

The ds.xml reads like this :
<clsItem>
<Usernames>
<Username>Willie</Username>
<Username>William</Username>
</Usernames>
<Username>Bill</Username>
</clsItem>

when it should read like this :
<clsItem>
<Usernames>
<Username>Willie</Username>
<Username>William</Username>
<Username>Bill</Username>
</Usernames>
</clsItem>


Here is the sample source :
'====================
For Each myRelation In ds.Tables(0).ChildRelations
For Each myRow In ds.Tables(0).Rows
arrRows = myRow.GetChildRows(myRelation)
MessageBox.Show(arrRows.GetLength(0))
ReDim Preserve arrRows(arrRows.GetLength(0))
'How to add a Row into arrRows ???
'How to assign arrRows back into ChildRows ???
Next myRow
Next myRelation
'====================


Thanks for any help or advice.

--
William T
Chief Software Developer
Software Architect
Softwaremaker.Net Pte Ltd

+++++++++++++++++++++++++++++


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
GetChildRows and add them to new table mike11d11 Microsoft ADO .NET 0 6th Dec 2006 02:09 AM
Q: GetChildRows G .Net Microsoft VB .NET 2 5th Oct 2006 09:49 AM
GetChildRows() Fails. MioTheGreat@gmail.com Microsoft ADO .NET 3 30th May 2006 08:04 PM
GetChildRows Christopher Weaver Microsoft C# .NET 9 13th Jun 2005 01:41 PM
How to add Rows to GetChildRows ? Softwaremaker Microsoft ADO .NET 3 25th Jul 2003 01:57 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:36 AM.