User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the VB.NET section within the Software Development category of DaniWeb, a massive community of 456,508 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,677 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our VB.NET advertiser: Programming Forums
Views: 1610 | Replies: 6 | Solved
Reply
Join Date: Oct 2006
Location: England
Posts: 156
Reputation: ptaylor965 is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 19
Sponsor
ptaylor965's Avatar
ptaylor965 ptaylor965 is offline Offline
Junior Poster

Question Xml & Ado.net

  #1  
Sep 25th, 2007
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
Peter Taylor
Visual Basic.NET Application Developer

TaylorsNet
http://www.taylorsnet.co.uk
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2006
Location: United States
Posts: 613
Reputation: binoj_daniel is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 15
binoj_daniel's Avatar
binoj_daniel binoj_daniel is offline Offline
DaniWeb Expert

Re: Xml & Ado.net

  #2  
Sep 25th, 2007
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.


Reply With Quote  
Join Date: Dec 2006
Location: United States
Posts: 613
Reputation: binoj_daniel is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 15
binoj_daniel's Avatar
binoj_daniel binoj_daniel is offline Offline
DaniWeb Expert

Solution Re: Xml & Ado.net

  #3  
Sep 25th, 2007
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.
Reply With Quote  
Join Date: Oct 2006
Location: England
Posts: 156
Reputation: ptaylor965 is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 19
Sponsor
ptaylor965's Avatar
ptaylor965 ptaylor965 is offline Offline
Junior Poster

Re: Xml & Ado.net

  #4  
Sep 25th, 2007
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
Peter Taylor
Visual Basic.NET Application Developer

TaylorsNet
http://www.taylorsnet.co.uk
Reply With Quote  
Join Date: Dec 2006
Location: United States
Posts: 613
Reputation: binoj_daniel is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 15
binoj_daniel's Avatar
binoj_daniel binoj_daniel is offline Offline
DaniWeb Expert

News Re: Xml & Ado.net

  #5  
Sep 25th, 2007
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.
Reply With Quote  
Join Date: Sep 2007
Posts: 1
Reputation: Ciddan is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Ciddan Ciddan is offline Offline
Newbie Poster

Re: Xml & Ado.net

  #6  
Feb 6th, 2008
Good thing LINQ came around then
Reply With Quote  
Join Date: Dec 2006
Location: United States
Posts: 613
Reputation: binoj_daniel is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 15
binoj_daniel's Avatar
binoj_daniel binoj_daniel is offline Offline
DaniWeb Expert

Re: Xml & Ado.net

  #7  
Feb 14th, 2008
Yes, LINQ is defintely a good evolution for dynamic queries.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb VB.NET Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the VB.NET Forum

All times are GMT -4. The time now is 3:45 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC