473,320 Members | 1,884 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,320 software developers and data experts.

problems with Readxml Writexml in a dataset

I am writing the file correctly and it gives me the right xml file
When I read it back, I am missing one element in the last row, it sets
it to the initial value before I saved the origional file? Any ideas?
Thanks,
I am loading the xml file with this code;

Dim myFileStream As New System.IO.FileStream _
(filename, System.IO.FileMode.Create)
' Create an XmlTextWriter with the fileStream.
Dim myXmlWriter As New System.Xml.XmlTextWriter _
(myFileStream, System.Text.Encoding.Unicode)
' Write to the file with the WriteXml method.
thisDataSet.WriteXml(myXmlWriter)
'for some reason the xml is skipping a Severity value
' RichTextBox1.Text = myXmlWriter.WriteRaw
myXmlWriter.Close()
myFileStream.Close()

I am reading the xml file back with this code;

' Create new FileStream to read schema with.
Dim fsReadXml As New System.IO.FileStream _
(xmlAd, System.IO.FileMode.Open)
' Create an XmlTextReader to read the file.
Dim myXmlReader As New System.Xml.XmlTextReader(fsReadXml)
' Read the XML document into the DataSet.
datasetRM.ReadXml(myXmlReader)
'datasetRM.ReadXml(xmlAd)

myXmlReader.Close()
fsReadXml.Close()
Nov 20 '05 #1
0 1195

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

Similar topics

11
by: DraguVaso | last post by:
Hi, I should use XML to synchronize the data from different (VB.NET) applications, and I was just wondering which Overloads of these functions ( ReadXmlSchema, ReadXml and WriteXml) goes the...
0
by: John George | last post by:
I am writing the file correctly and it gives me the right xml file When I read it back, I am missing one element in the last row, it sets it to the initial value before I saved the origional file?...
2
by: C Glenn | last post by:
I'm attempting to use ReadXml. It's working in that I end up with some data in the DataSet. But I'm not able to deal with it effectively after that. The XML file is properly formatted in that it...
0
by: =?Utf-8?B?bXJjc2hhcnBtYW4=?= | last post by:
Hello, There is a space(as a data) in one of the columns. And i save my DataTable as a xml file using DataSet. I used DataSet.WriteXml method to save as a xml file. Now if I read that .xml file...
0
by: Arto Viitanen | last post by:
I am using WriteXML/ReadXml pair to save DataSet for later use. DataSet is built by reading textfiles and storing their data to different DataTables. Each file contains several complex values, that...
2
by: joey.powell | last post by:
Hello guys, I have a pretty simple app that reads XML data (.ReadXML) into an in-memory dataset, runs some linq queries, mods the data, and then writes the XML (.WriteXML) back to disk. ...
2
by: Tony Johansson | last post by:
Hello! Assume the following : 1. I create a DataSet with some DataRelation. 2. I then use WriteXml to write the DataSet to an Xml document using DataRelation.Nested = True 3.I then read the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
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: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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...

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.