Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to store data in a desktop .NET application?

I want to create an application to send newsletters. I thought of storing all the information in a database (name, address, messages etc.) in a few tables. However, I wonder wheter this is the way how the real applications are done. In my case I have the SQL server installed on my computer so I can connect to it locally. What if someone else uses the program, but has no server installed on his computer?

I need this information for my univeristy project. I have to use ADO.NET.

like image 815
pmichna Avatar asked Jan 19 '26 08:01

pmichna


2 Answers

You can use an embedded database - this is normally a file based database that you can distribute with the application.

SQL Server CE and Sqlite are two popular options.

like image 84
Oded Avatar answered Jan 20 '26 22:01

Oded


If you need the data to be shared across multiple clients then you have to deal with the logistics of a central data store.

If it's OK for the data to be local-only, System.Data.SQLite is probably the best choice as it gives you simplicity of deployment (just copy a file), lots of features, and an ADO.NET interface.

like image 40
Jon Avatar answered Jan 20 '26 23:01

Jon