I have a small windows application I wrote using Visual Studio 2010, CSharp, .NET 4.0 that does some scanning of remote pages using HTTP Requests, Pings, and DNS lookups.
It then shows the results of the scan in tables (tabbed at the top) ordered by a column.
It’s pretty simple but I want to add a “settings” panel or menu option so that the user can add certain configuration options such as
-Timeout duration (HTTP calls)
-Proxy details (port and IP)
-Useragent
-Email login details, port, email account type IMAP/POP3, password etc
-Anything else
Therefore I want to add a small DB that is “ingrained” into the application and comes as part of the .EXE.
I am used to writing client / server apps where the DB is on a remote server and the app somewhere else and using ADO connection strings to connect to this remote SQL Server which I then use management studio to look at the data.
I am not sure where to start with this type of small DB hooked into the app. Do I use SQlLite or SQL CE or some other kind of MS SQL DB.
Do I have to write code inside the app to “create the DB, tables and populate them” and then get the data back out if they exist to show to the user so they can edit the details.
Does the DB sit separately from the .EXE or is it part of the .EXE when I give it out to people as ideally I want it to be all part of the .EXE.
I am sure there are great tutorials online which I am looking through but I would just like to hear other peoples thoughts on the way to go and the best approach.
Any links to guides or tutorials would be great if you have any.
Thanks in advance.
For small amounts of data, in particular if they are per-user, you can use the built-in Settings feature.
For larger amounts of data, in particular data you wish to query on, I suggest using an embedded database – SQL CE or SQLite are popular choices.