tags:

views:

70

answers:

4

i will need to store 3 tables of data

instead of implementing an entire database backend, i just want to store the record for these tables in application.settings

has anyone done this before?

i dont care about security

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

perhaps storing a matrix in application.settings would be OK?

A: 

My.Settings is not a substitute for a database. You should consider System.Data.SQLite instead. SQLite is a in-process database that stores data in a single file. System.Data.SQLite is a .NET binding for it.

Matthew Flaschen
not every 10 rows of data requires full blown database
Alex Reitbort
@Alex, he didn't say it was only 10 rows. In fact, he said pretty much nothing about his use case except that it was "lots of data". Given what we know, My.Settings seems inappropriate.
Matthew Flaschen
+1  A: 

Why not. If you can fit the data in memory without a problem (and what is you definition for a lot of data???) and you do not need db features like sql and ACID you can store it in app.settings without a problem

Alex Reitbort
+2  A: 

Yes; this is possible.

You can make a (Typed) DataSet, then call WriteXml into a StringWriter and put the string into the Settings object.

SLaks
+1  A: 

Hey,

For the "how else would you do it" part of the question, I would consider XML or CSV. XML specially because LINQ to XML make it real nice to work with XML, but CSV too helps reduce space and here's a really fast reader for it: http://www.codeproject.com/KB/database/CsvReader.aspx

HTH.

Brian