multi users writting to same XML file from Access

TIbbs

Registered User.
Local time
Today, 00:19
Joined
Jun 3, 2008
Messages
60
I finally figured out how to append to my XML file using the XML DOM Reference.
We use an application that reads an XML file and uploads the data into Sage Line 50.
We are planning to carry out a series of order processing using Access, to stop a lot of the errors and solve some of the speed issues that we encounter when users are using Sage 50.
My problem is that the xml file would need to be loaded by each user onto memory so that they can append to it.
I can see already a series of problems there:
-Would they lock each other out when trying to load the document?
-Would they overwrite the data when both users are appending to the file?
-How long will the file take to load and find the nodes if many orders are saved within the file?

Any ideas?
To avoid loading times of the reading of the tree nodes I thought of writting to a log text file and then append the data from the log file into the main xml document.

Which leaves me with two worries, of the users writting to the log files at the same time, and how could I automate from Access to read each log file at a certain period of time and append it to the xml file?
 
what are you using the access dbs and xml file for exactly

in general terms, i would have thought you were best using access to control the data, and then when it is required generating the xml file from the access data, rather than try to edit the xml file directly.

if the data changes, regenerating a file from scratch is probably easier than trying to edit it directly
 
We are planning to run a series of sales orders in Access and export this data as an xml file, as and when they are created, so instead of overwritting the xml file we need to append to it new data as and when the new orders are processed.
The application can only read from one specific file rather than a folder,
so you end up with each user having to load the file into memory prior to append to it in the specific tree node. That's why I thought of log text files, if the XML file gets bigger it's not a big problem as we don't have to read the whole tree it and the file is only loaded once by one application.
The other application reads the xml file, processes it and posts the data into Sage.
This should helps us keep errors to a minimum and stop Sage being slowed down by the order processing.
Then those orders can be sent back to the warehouse for processing.
 
i suppose it depends how your xml is constructed/terminated

if its got a batch trailer, then you will need to insert the new order node somewhere in the middle

if its just a header and a load of orders, then perhaps you can just append the new order to the existing (text) xml file

not sure - i am generating xml trees from access data, but i have only looked into generating and parsing entire trees - i have not tried to amend existing xml in code
 
i suppose it depends how your xml is constructed/terminated

if its got a batch trailer, then you will need to insert the new order node somewhere in the middle

if its just a header and a load of orders, then perhaps you can just append the new order to the existing (text) xml file

not sure - i am generating xml trees from access data, but i have only looked into generating and parsing entire trees - i have not tried to amend existing xml in code

the file is formated specifically so that you would have to navigate to the specific node of the tree and append it as the last child of that node.
I am still unsure in how to proceed.
The application that collect the xml file for processing can rename the file after processing, so it might be an option to just create a new tree at each instance, but it would leave the users in a queue as my code would have to test to see if the file exists, and if not then create the file.
Never had to deal with deploying to a series of users before so am lost at the moment.
 

Users who are viewing this thread

Back
Top Bottom