shalan99

Hi guys/gals!

I read an article on 'visualbasic.about.com' (can't remember th exact URL) but it explained the use of XML as a database for applications. Now I currently have a working application that is using SQL Server 2005 Express as its db. For reasons such as users having to install the DBMS on the machines, the large setup file for deploying with SQL Server as a prerequisite, and mor on the lines that my database has only 2 small tables with one foreign key relation between them, and the data should not contain more than 50 rows in Table1 and 15 in Table2.

Would I be able to work with XML as a file-type database in this regard, or would u deem it not feasible taking into account the above-mentioned

If this is feasible as a more "light-weight" solution, how should I go about my business Can I create a dataset representation of my tables in the Dataset Designer and then persist that to an XML file

Please could someone shed some light on this for me, or direct me to a step-by-step article or video

Thank you and kind regards!
shalan


Re: Windows Forms Data Controls and Databinding Using XML as a file-type database in WinForms applications

Ken Tucker

You could use DataSet.WriteXml to save the dataset to a xml file. Use dataset.readxml to read the xml in.

http://msdn2.microsoft.com/en-us/library/ms135425.aspx

http://msdn2.microsoft.com/en-us/library/system.data.dataset.readxml.aspx

Sql Compact edition is a light weight version of sql server might be a good option for you also.

http://www.microsoft.com/sql/editions/compact/default.mspx






Re: Windows Forms Data Controls and Databinding Using XML as a file-type database in WinForms applications

shalan99

Hi Ken,

thanx for the reply and for the helpful links! I always thought that SQL Compact Ed was solely for apps developed on Windows Mobile...wow!

Anyway, I want to ensure that my want to use XML in my app is for the right reasons...I need a database or equivalent that will:
  • be lightweight
  • allow use across multiple Windows user accounts
I know that SQL Compact is lightweight but wont deliver use across multiple Windows user accounts, but will the use of XML accomplish this in this regard

Thank u!

Regards
Shalan99




Re: Windows Forms Data Controls and Databinding Using XML as a file-type database in WinForms applications

shalan99

Sorry, I think I have confused issues a bit. When I referred to Multi-users, I didnt mean multiple users at one time...purely users for each windows account...IE, setting "User Instance=True" like in SQL Server 2005 Express Can SQL Server Compact Edition support this



Re: Windows Forms Data Controls and Databinding Using XML as a file-type database in WinForms applications

Rong-Chun Zhang - MSFT

Hi shalan99,

This forum is only for Windows Forms programming questions. You can ask question about SQL Server Compact Edition on SQL Server Compact Edition Forum.

http://forums.microsoft.com/MSDN/ShowForum.aspx ForumID=152&SiteID=1

Thanks.
Rong-Chun Zhang






Re: Windows Forms Data Controls and Databinding Using XML as a file-type database in WinForms applications

shalan99

Hi Rong-Chun,

sorry about that, didnt realise there was a dedicated forum for SSCE. will post my question there. However, Ken was very helpful with his initial answer to my question about using XML (the links were quite useful), so thanx also Ken

Cheers