Using XML file as a data source - concurrency problem?

A

Artur Sorszegi

Hi!

There a lot of examples and talk about using an XML file as a datasource.
Given a DataSet object, you can easily load data from the XML file, and
display it in for example a DataGrid, or bind the data to other controls.
You could even edit the data, and save it back using the DataSet objects'
WriteXml method. But these resources fail to specify one thing, namely, if
this causes any problems when multiple users use the application at the same
time? I think you could use the expression concurrency problem for it, where
two users start using the data at the same time (for example), and both make
changes, first the first saves it, then the second. My feeling is, that this
could overwrite changes by one user with changes of the other.

Is this really so? Can it be prevented? In many cases, an XML file could
server just as well as a database, but having this problem, and not even
knowing if it works, make it not a so good solution.

I assume, that page requests can be processed in parallel by ASP.NET (or
else this would not be a problem).

Anyone, any ideas?

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,734
Messages
2,569,441
Members
44,832
Latest member
GlennSmall

Latest Threads

Top