I want to embed the SQLite database into my C# windows form app (.exe) so I can give a very non-tech savvy client just the .exe file and nothing else. The database is read-write and I need to access its path for the DataSource like so:
SQLconnect = new SQLiteConnection("DataSource=" + path + ";Version=3;Compress=True;");
I also tried saving the database to a folder on Desktop but SQLiteConnection.CreateFile(path) seems to fail because if I put the .exe file outside the bin/debug folder, .exe does not open at all (but it creates the necessary folder on Desktop).
But as long as it is in the bin/debug, it creates the database file and creates the tables and .exe works perfectly. There are no errors raised at any point in the application.