Storing data in a local database

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm writing an application that needs to store data locally (in C#). This
will be deployed on end-user machines (XP, Vista and 2003 Server). I want to
store the data in a database. The volume of data is not huge (about 1 to 5
megs).

My question is what database to I use? I can only assume the users will have
standard installs of the operating system (fully packaged). There is no SQL
Server or anything special on them. I need to create the database - not just
use it.

Do I have to install a database engine, or is there one shipped as part of
the OS. If I have to install one, what is recommended (e.g. free, least
invasive and most documented)?

I used to used DBISAM and Delphi, which was great as it compiled straight
into the exe, but I've never done any local database work under .NET - only
connecting to remote SQL databases.

Any advice would be appreciated.
 
If the data is for each user, you can deploy the SQLServer CE database
freely. It is a one-user database. It is almost a file, but you can run
applications against it. You don't need to install SQLServer on the user's
computer, but may need to install some dll's.

Bill Vaughn wrote an e-book on SQLServerCE; if you Google him and
"SQLServer", you'll find his web site.

RobinS.
GoldMail.com
 
A Microsoft Access database sounds perfect for what you are wanting to do.
This database was used for years until Microsoft realized they could make
more money with SQL Server, then suddenly running an Access database became
taboo.

Access databases are only good for one person accessing the data at a time,
and they have a 2GB size limit.

Another option would be to use an XML file to store your info. The good
thing about using an XML file is that if you decided to expand to including
your data on a server, there would not be anything to do but redirect the
path to the file.

Also, modern Microsoft programs in Visual Studio have a lot more examples on
how to code an XML dataset than they do on how to code an Access dataset.

Access is still good, but it has been Eight Balled for some reason.
 
ARrgh! Ah, no. SQLCe is ideal for this. Let's encourage developers to use
fewer obsolete architectures...
Microsoft's (and my) reluctance to endorse Access/JET databases has more to
do with security and viability of architecture than with making money.

--
__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker’s Guide to Visual Studio and SQL Server (7th Edition)
____________________________________________________________________________________________
 
Back
Top