views:

59

answers:

1

My program needs to start auditing saved XML data for users. Whenever the user clicks 'Save'; I'll need to insert his current data (serialized to XML) and save it somewhere. What is the better option between:

1) Creating a text file and dropping all the xml in there. (Creating a new text file per save)

2) Using a table in MS Access

I'm using .Net 2.0 / MS Access 2003

A: 

The benefit IMHO of using tables in any DBMS over file storage is the ability to query / mine the data afterwards. Also, with text files, you will need to come up with strategies for 'unique file naming' and overcome limitations of how many files you can store per folder etc. Bottom line : If you already have a DB, then would recommend going with a table.

nonnb
@nonnb Very true, I supposed my question then is what data type in MS Access can hold XML data? Memo?
mint
Yes a memo field would work just fine or if you knew the length would not be greater than 255 then you could use a normal text field
Kevin Ross
@kevin Yeah it will definitly b3 > 255. Memo works great. Thanks
mint
There's also indexing to speed up searching the data. Theoretically, you could load XML into an ADO recordset and add a virtual index and get the performance benefit, but why bother?
David-W-Fenton