Fog Creek Software
Discussion Board

Welcome! and rules

Joel on Software

storing data locally for an app

I'm interested in writing an app and am looking for a solution to store data.  I like using databases, but expecting others to have SQL Server, or at least MSDE loaded is a bit much for my app.

I've done some looking, and I've found SQL Lite ( with a .NET wrapper in progress (

Are there any other solutions I should look into? 

Wednesday, October 16, 2002

how about an access db? unless you're doing very complex stuff, it's usually up to it, the jet db engine is well proven and tested/documented, and it's relatively low cost. it's also very simple writing oledb code to work with it.

people might claim that it's been "replaced" by msde, but i don't really think this is the case. access isn't going anywhere. it's just a diversification of the desktop db area. the only thing you lose is an easy upgrade path to a full sql server setup if/when needed.

Andrew Cherry
Wednesday, October 16, 2002

I'm looking for a free solution too.  Though, Access would be fine.  Citydesk uses it, right?

Wednesday, October 16, 2002

Yep, Access is the go for sure, and yep, citydesk using it.

Wednesday, October 16, 2002

I tend to go with the Jet (Access) option.  If you go that way make it the latest version.  (There are a few odd problems with some earlier versions.)

I've even used csv's with a schema.  (Traditional COM style ADO supports this although it tends to be little known.  I've not even looked to see if this can be done with ADO.NET.)  This was the most pragmatic option for importing data where I used it but was not my first choice.

Some people as using XML as a datastore.  (Sounds interesting but I've not yet tried it.)

Mike Gale
Wednesday, October 16, 2002

Ok, I found this article ( that talks about creating a blank jet DB from scratch and accessing it through c#.  Is this the right track?

thanks for the insight everyone...

Thursday, October 17, 2002

Though it's still in it's beginning stages, ObjectSpaces from MS provides an interesting solution to this.  Although it's typically used to perist objects to a relational database (SQL Server), it can also be used to disk via XML.

One benefit is that, with a few changes of a configuration file you could go from XML to SQL Server without changing your code.

Jeff Reese
Thursday, October 17, 2002

As an Access developer (don't laugh), I still have a soft spot in my heart for the Access 97 MDB format.  Access 2k introduced Unicode compatibility, thereby doubling the disk space consumed by text fields in tables for no real benefit (to me, that is; I tend to work with text-intensive data).  Just something to keep in mind if file size is an issue.

XML is also a nice cheap file format, as long as you're not storing or querying a significant quantity of data.

Sam Gray
Monday, October 21, 2002

Well, the Access 2000 libraries are working fine for my use I suppose.  Though, the amount of data at the time is so small, I can just as easily use XML...

I'm realizing though, I can't distribute my app as open source anymore.  And, is it illegal to use these libraries in my app?  The jro.dll and adox.dll files don't come with Windows itself do they?

Course, maybe it's best that no one sees my work now anyway...

Monday, October 21, 2002

Jet is redistributable. You'll find the latest bits in Jet 4.0 SP3 - see

Mike Gunderloy
Wednesday, October 23, 2002

If open source distribution is important, perhaps a look at Berkeley DB from Sleepycat Software might be useful.

I haven't used it myself, but it looks quite impressive!

Neil Attard
Thursday, October 24, 2002

Try prevalence engine. You can check out the .Net implemenation at

Dody Gunawinata
Thursday, October 24, 2002

I've written a code generator that takes in an XML description of your tables and generates wrapper objects for each.  It only works for fairly simple storage requirements, but it can save you a fair bit of typing if your data does fit in nicely.

It's an "active" code generator - - i.e. it generates code that you should never have to touch.

It's open source, MIT license, so you can fix it if it doesn't already do what you want ;-)

Phillip Pearson
Thursday, October 24, 2002

*  Recent Topics

*  Fog Creek Home