Useful Tip

I couldn't find a way to open a data store using a traditional connection string, only the direct use of an SQLite file name was available.

I remembered that in the base System.Data.SQLite assembly there was a class called

SQLiteConnectionStringBuilder

I've used this many times in the past for building connection strings, but it only just occurred to me that I could also use it to parse them.

With that in mind, I created myself a normal run of the mill bit of access code to get the connection string from my app.config file using the ConfigurationManager, then once I had my full normal connection string loaded, I created a new SQLiteConnectionStringBuilder

Once I had the connection string builder it was then just a simple matter of looking in the DataSource property to find the file name of the database file, and then passing this into a new "DataStore" object as the file name it expected.