473,698 Members | 2,556 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1328
> 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.Table s(stTransTbl).I mportRow(dr)

Next ' Each dr In .Rows
"Axel Dahmen" <NO*****@NoOneK nows.invalid> wrote in message
news:Os******** ******@TK2MSFTN GP14.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
3959
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 update database or object is read-only". This is a workstation machine, not connected to any other computer, and I login to the PC using an administrator account. I already check the .MDB file is NOT read-only. But, I do not see the .LDB file....
1
2239
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
3064
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 exploit .Net technology to implement this? Any idea on this? Thanks.
16
17011
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 must be UPDATED, if not, they must be INSERTED. Logically then, I would like to SELECT * FROM <TABLE> WHERE ....<Values entered here>, and then IF FOUND UPDATE <TABLE> SET .... <Values entered here> ELSE INSERT INTO <TABLE> VALUES <Values...
3
2398
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
5022
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 table but I am looking for ideas on how to handle the update. Since the application is running, I can't just replace that EXE. The only way I've thought of is to have a small front end app that does the version check and download if needed? I'm...
4
3006
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 a web page e.g. IndexNo ............Title................................ Link .................................... Count ......1.............MyFileName........www.mysite/files/MyFileName.doc........
6
1366
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 performed? Also, is there a way to put in a variable in the message box base on the results of the Update? TIA!!
2
3106
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 havnt tested the index yet ) so you can use an .UPDATE( dataTable ) on the data adapter. Otherwise you will get an exception error. Is this statement true? ---- Now me fumbling thru
6
7265
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 : evry day, i store the number of children in my classroom in my XML file. For exemple, on monday, my app ask me something like this : msgbox ("Are the 28 children here today ?",vbyesno)
0
8683
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8609
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9170
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8901
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
4371
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2336
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.