C #: saving a lot of data in my.settings

I will need to store 3 data tables

instead of implementing a full database backed, I just want to store an entry for these tables in application.settings

Has anyone done this before?

I don't care about security

is it advisable to do this with application settings? how else will you do it?

maybe saving matrix in application.settings would be OK?

+2


a source to share


4 answers


Yes; it is possible.



You can create a (typed) DataSet, then call WriteXml

in StringWriter

and put a string in a Settings object.

+2


a source


Why not. If you can fit data into memory without issue (and what do you define for a lot of data ???) and you don't need db functions like sql and ACID, you can store them in app.settings without issue.



+1


a source


For the "how else would you do this" part of the question, I would consider XML or CSV. XML on purpose because LINQ to XML does a great job of working with XML, but CSV helps cut space too, and here's a very quick reader for it: http://www.codeproject.com/KB/database/CsvReader.aspx

NTN.

+1


a source


My.Settings does not replace the database. Instead, consider System.Data.SQLite . SQLite is an in-process database that stores data in a single file. System.Data.SQLite is the .NET binding for it.

0


a source







All Articles