473,406 Members | 2,312 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,406 software developers and data experts.

Update XML File

Hi I have an application where I need to Update an XML file.

The source is an Access DB.

The Application imports new records from the Access DB into a DataSet and
then needs to update the XML File.

The problem I have is that WriteXML overwrites the existing XML file so on
subsequent run only records that are new since the previous run will be in
the XML file.

I thought I could over come this by first reading the XML File into a
DataSet and then appending the new records from the DataTable of New Access
DB records into the DataTable of existing XML records.

However the only way I know of doing this is to itterate the rows of
dtAccess, creating a new row (rowNew) in dtXML and setting the value of each
field in rowNew to the Column value for each corresponding field in the
current row of dtAccess.

Is this the only solution or is there a way I can append a new row to dtXML
by copying the entire row from dtAccess?

Or is there a way of appending rows to the XML file?

Thanks

Doug
Nov 12 '05 #1
2 1315
> Is this the only solution or is there a way I can append a new row to
dtXML
by copying the entire row from dtAccess?

Or is there a way of appending rows to the XML file?


Hi, Dough,

try:

DataTable.Rows.Add(...)

HTH,
Axel Dahmen
www.sportboatcharter.com

Nov 12 '05 #2
Thanks Axel,
I have solved it using

For Each dr In dtTrans.Rows 'Import rows from dtTrans into dsExtract

dsExtract.Tables(stTransTbl).ImportRow(dr)

Next ' Each dr In .Rows
"Axel Dahmen" <NO*****@NoOneKnows.invalid> wrote in message
news:Os**************@TK2MSFTNGP14.phx.gbl...
Is this the only solution or is there a way I can append a new row to

dtXML
by copying the entire row from dtAccess?

Or is there a way of appending rows to the XML file?


Hi, Dough,

try:

DataTable.Rows.Add(...)

HTH,
Axel Dahmen
www.sportboatcharter.com

Nov 12 '05 #3

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

Similar topics

1
by: Fie Fie Niles | last post by:
I have IIS installed on XP Professional workstation machine. I have an ASP page that open connection to an Access database, then when trying to update the database, it gave me the error "cannot...
1
by: revolnip | last post by:
As attached is the code : <% Option Explicit dim lngTimer lngTimer = Timer %> <!--#include file="Connect.asp" --> <!--#include file="Settings.asp" --> <!--#include file="Common.asp" -->
2
by: joo | last post by:
Hi! I need to implement something similar to "Automatic Update" feature which we see in windows 2000. We need this support for our software, basically to provide the software update. How can I...
16
by: Philip Boonzaaier | last post by:
I want to be able to generate SQL statements that will go through a list of data, effectively row by row, enquire on the database if this exists in the selected table- If it exists, then the colums...
3
by: Paulb1us | last post by:
I want to update records from a csv file. I do this in a button click: //Create Adapters da = new OdbcDataAdapter("Select * FROM test.csv", conn); //Fill a data table da.Fill(dt);
5
by: Wayne Wengert | last post by:
I want to have my application (VB.NET) check a table on an SQL server to see if there is a newer version released and, if so, download and install the new version. I know how to setup the database...
4
by: Ian Davies | last post by:
Hello I have seen some tutorials to put a update a counter field in a record. I have the counter field in a table that also has a field for a path to file. I display the records in a table on...
6
by: Rudy | last post by:
Hello all! I'm working in vb/ado.net I want to to have a message box pop up based on a result of a update on a SQL table. How do I do that so it automaticly pops up after the update is...
2
by: Miro | last post by:
I will ask the question first then fumble thru trying to explain myself so i dont waste too much of your time. Question / Statement - Every mdb table needs a PrimaryKey ( or maybe an index - i...
6
by: | last post by:
Hi, I'm steel trying to read and update my XML file with Visual Basic Express but i am unable to find the right way to read my xml file and update it if neccessary... Here is my problem :...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.