|
-
Jul 22nd, 2008, 12:48 PM
#1
Thread Starter
Addicted Member
[2008] DataSet.ReadXML question
Hi,
As a relative newcomer to XML, I wonder if somebody could confirm my suspicions.
If I have a DataSet created in the designer, containing one table, am I right in thinking that to add records to the table, I would need to iterate through my DataSet.ReadXML, and populate the designer dataset one record at a time?
-
Jul 22nd, 2008, 12:54 PM
#2
Re: [2008] DataSet.ReadXML question
nope,You can directly add new Record to you datatble object by using DataRow Object.
e.g
Code:
dim drNew as DataRow
drNew = dtMyTable.NewRow
drNew.Item(0) = "Value"
dtMyTable.Rows.Add(drNew)
the above code will add new record to your datatable.
Ps: I Hope i got you question right.
__________________
Rate the posts that helped you 
-
Jul 22nd, 2008, 02:16 PM
#3
Re: [2008] DataSet.ReadXML question
The DataSet.ReadXml method will read the whole contents of the xml file into the dataset.
Let us have faith that right makes might, and in that faith, let us, to the end, dare to do our duty as we understand it.
- Abraham Lincoln -
-
Jul 22nd, 2008, 02:56 PM
#4
Thread Starter
Addicted Member
Re: [2008] DataSet.ReadXML question
Thanks for your replies.
The designed DataSet is in place due to the requirements of the ReportViewer. I simply wanted to read my XML file, and stuff it into the designed DataSet.DataTable.
I had wanted to do a simple ReadXML, but because this reads everything all in one go, I was thinking that I'd have to set up an XML reader to read one record in at a time.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|