944,205 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Marked Solved
  • Views: 3095
  • VB.NET RSS
Sep 25th, 2007
0

Xml & Ado.net

Expand Post »
Is it possible to issue SQL Style Commands to manipulate data from XML Files

ie. SELECT, INSERT, UPDATE and DELETE

The reason i ask is the i want to write an appliclation that will store the database with the application but with out the user needing to have MSAssess (for MDB or ACCDB files) installed

I have used MDBs, ACCDBs, SQL and SQLExpress before but
SQL is for Network apps
SQLExpress is for Local PC Data based apps

MDB & ACCDB can be used to transfer the data along with the app but require the users PC to have MSAccess installed



so is there any way to use SELECT, INSERT, UPDATE and DELETE statments with XML, If not is there any other datasource type that will
Similar Threads
Reputation Points: 16
Solved Threads: 19
Junior Poster
ptaylor965 is offline Offline
169 posts
since Oct 2006
Sep 25th, 2007
0

Re: Xml & Ado.net

Yes, it is possible to save and load Datasets to and from xml.
And after loading you can manipulate the dataset as you would after filling it with data from any database.

Here is how you can use the Select.
Load your XML file into DataSet and Select() method to select from your XML.


Reputation Points: 25
Solved Threads: 18
Practically a Master Poster
binoj_daniel is offline Offline
645 posts
since Dec 2006
Sep 25th, 2007
0

Re: Xml & Ado.net

The only issue I found with this approach is that, you have to load the entire xml file into your dataset. wich could be a problem when your database gets to a larger size. I would still use SQL Server, XML requires you to load ALL the data first before being able to query it. At least with SQL server you can query the exact id you want. With increase in the XML file size there will be performance issues too.

Data Backup and reliability is also high on SQL. But as you want to go without any DB software. It can be either XML or .dat files.
Reputation Points: 25
Solved Threads: 18
Practically a Master Poster
binoj_daniel is offline Offline
645 posts
since Dec 2006
Sep 25th, 2007
0

Re: Xml & Ado.net

Thanks binjo_daniel,
I was looking at using dataset.readxml & datatable.readxml but i wanted to use SQL Statements to filter the data

I will look into .dat files but i think dataset.readxml & datatable.readxml will work for some small apps


I hope that VB.NET 2008 has SQL Statments for XML Queries as i work with SQL every day and much prefer to have the control that the SQL Statments bring over DataAdapter.update and Datatable.WriteXML


Thanks
Reputation Points: 16
Solved Threads: 19
Junior Poster
ptaylor965 is offline Offline
169 posts
since Oct 2006
Sep 25th, 2007
0

Re: Xml & Ado.net

Hope they include something to support your requirement in Orcas. Code Name for VS 2008
Last edited by binoj_daniel; Sep 25th, 2007 at 5:50 pm.
Reputation Points: 25
Solved Threads: 18
Practically a Master Poster
binoj_daniel is offline Offline
645 posts
since Dec 2006
Feb 6th, 2008
0

Re: Xml & Ado.net

Good thing LINQ came around then
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Ciddan is offline Offline
1 posts
since Sep 2007
Feb 14th, 2008
0

Re: Xml & Ado.net

Yes, LINQ is defintely a good evolution for dynamic queries.
Reputation Points: 25
Solved Threads: 18
Practically a Master Poster
binoj_daniel is offline Offline
645 posts
since Dec 2006

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: crystal report
Next Thread in VB.NET Forum Timeline: DataGridView Behavior





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC