Using XML as dataSource

Paszt

Staff member
Joined
Jun 3, 2004
Messages
1,500
Location
Raleigh, NC - USA
Programming Experience
Beginner
I'm working on a website for a small Funeral Home (http://salemfh.com) and want to use XML as the dataSource for a few things such as staff directory. I'm thinking XML instead of SQL server because of the price of using a dataBase. But I still want the ability to edit, insert, and delete through the ASP.NET app to provide administration abilities.

I've found tutorials using Framework V1 (Quickly Editing an XML File) but I'm hoping that Framework V2 offers a simpler way.

Anyone have links, ideas, alternatives?
 
This is what I've done on this page: http://salemfh.com/staff.aspx. It even uses cacheing with CacheDependency based on XML file.
That's also what is shown in the tutorial link posted above.

But what about binding to view controls like the gridview and supporting editing, deleting, and inserting?

I've done all this in V1; insert commandFields and corresponding event handlers, write the code to insert/delete/edit record manually.
I was hoping there was a quick way using features new to V2 and pretty much design view only.

I'm guessing there isn't though, just wanted to make sure.
 
I did a web based app in v1 using the Janus GridEx called quikSlip (http://www.merchantapps.com/) and the grid essentially binds and manages the dataset, then I handle the loading/saving of the XML persisting the DataSet as needed. I suggest just bind your controls to the DataSet/DataTables and it should be a cinch!
 
Third party is not an option, budget.

Well "a cinch" is relative.
The way I did it in V1 was relatively simple, but I'm just checking to see if V2 offers even more simplicity. I'm beginning to believe it doesn't.

Neal said:
I suggest just bind your controls to the DataSet/DataTables and it should be a cinch!
I created a gridview and a dataset, loaded the dataset using ReadXML, binded the dataSet to the gridView, added a CommandField to the gridView. Of course when I run the app and click the Edit link I get the error "The GridView 'GridView1' fired event RowEditing which wasn't handled". So it seems I have to handle it in the same way I did in V1 which is OK.
 
Why not use SQL server express edition? It will do most of what SQL server will do, the only drawback is the 4Gb database size limit, which really is a lot when you think about it!

Free is my favourite price in the world...
 
Can I also be a little cheeky as suggest a border around the pop out menus - they are hard to decipher from the text on some pages.
 
Why not use SQL server express edition? It will do most of what SQL server will do, the only drawback is the 4Gb database size limit, which really is a lot when you think about it!

Free is my favourite price in the world...
Oh how I wish. The hosting plan I've inherited has a 10Mb database size limit. A dataBase with only 5 tables and no data is 2Mb. I'm not sure why though.
Anyone have any information on this?
Can I also be a little cheeky as suggest a border around the pop out menus - they are hard to decipher from the text on some pages.
I also inherited the design of the website and raised the same concern to the owner of the company. His daughter (my girlfriend) designed it and I'm not allowed to change that design.
 
Neil said:
I believe the default database size when creating a new DB in SQL Server is 2 MB file size.
I realized this just now as I was working with SQL Server Management Studio Express.
With this tool you can set the initial size and autogrowth size when creating a new database.
From what I've read, the database will start at the initial size and when more space is needed it will increase it's size based on the autogrowth size.
Need to do more research (Auto Shrink?)

Seems ironic that I've found this out after developing a TableAdapter class for XML datasources.

Can a 10Mb database hold a lot of information? I've searched (just started) for articles describing the data capacity. Any links?
 
I can only speak about access databases in this regard -
I had a recruitment database with full details (ie about 30 fields) for each employee - 4000 records
It had a list of companies they worked for, with all details about the company - 500 records

It also had another table with 'bookings' i.e. John Doe worked for XYZ Ltd monday 18:00 to 23:00
This had over 15000 records.

Total database size: 12mb.

There were also many other tables in there, but these were the real data hogs.

What sort of info are you looking to hold?
 
Back
Top