Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 01-05-2009
Member
 
Join Date: Apr 2009
Posts: 89
Working with XML and DataSet

Hello,

I have big database but from that i will select only few tables,few line with few users and will choose XML as data storage.

Until now I used to make a ReadXml () and WriteXml () from the DataSet, but now I want to manage concurrency.

Will it be possible to manage the concurrency in this case and if yes then How?

If i do certain specific changes to achieve that then will be able to change only the XML nodes that have been modified. In fact I do not adapt at all which allows operations update on Xml.

Similarly, I wish I could run a query on my file that I return a DataSet.

In advance thank you.
Reply With Quote
  #2  
Old 01-05-2009
Member
 
Join Date: Feb 2009
Posts: 40
Re: Working with XML and DataSet

I will recommend to use the dataset as it is collection of in-memory cached data ,So it's good to use datasets when:
  • we will be working with multiple separated tables or tables from different data sources.
  • when we are exchanging data with another application such as a Web Service.
  • we perform extensive processing with the records in the database. If you use a SQL query every time you need to change something, processing each record may result in connection being held open which may affect performance.
  • when you wanted to perform XML/XSLT operations on the data.
Reply With Quote
  #3  
Old 01-05-2009
Member
 
Join Date: Dec 2008
Posts: 202
Re: Working with XML and DataSet

Here I will explain about in what and how the methods would be declared:

WriteXml Method

This method writes the XML representation of the data in the DataSet object to a TextWriter object, an XmlWriter object, a Stream object or directly to a specified disk file. The syntax of overloaded versions of this method is below.

public void WriteXml(string);
public void WriteXml(TextWriter);
public void WriteXml(Stream);
public void WriteXml(XmlWriter);

This XML representation can either include or omit the corresponding XML schema.

ReadXml Method

This method reads the XML data (including a schema when present) into the DataSet from a TextReader, XmlReader, Stream object or directly to a specified disk file. The syntax of overloaded versions of this method is below.

public void ReadXml(string);
public void ReadXml(TextReader);
public void ReadXml(Stream);
public void ReadXml(XmlReader);
Reply With Quote
  #4  
Old 01-05-2009
Member
 
Join Date: Jan 2009
Posts: 99
Re: Working with XML and DataSet

To manage the competition process 2, generally using Mutex: Before you access the file, the process of attempting to acquire the mutex, and pay when hit has finished his treatment on the file. If another process B has already taken the mutex, A remains blocked until B releases.

Otherwise, you could have a WCF service which would only have access to the file, and therefore customers will access the service immediately, so the service can simply manage the competition between its various threads with block lock.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Working with XML and DataSet"
Thread Thread Starter Forum Replies Last Post
Dataset vs DataReader in .Net Vireshh Software Development 3 07-05-2011 11:32 AM
How to create a new DataSet Leonard Windows Software 5 23-03-2010 08:52 AM
Feed a dataSet from a SqlDataReader Layton Software Development 5 23-01-2010 10:25 AM
How to use dataset in ASP.Net? Roxy_jacob Software Development 3 28-11-2009 06:13 PM
How is DataSet.xsd used in any particular website Guns-n-Roses Software Development 3 25-09-2009 12:52 PM


All times are GMT +5.5. The time now is 09:24 AM.