I just started to learn C#, and currently trying to create a simple program that read 1 row of data from SQLite database.
I've successfully created the program, but i still have to refer to the .db file with full address like :
SQLiteConnection("Data Source=C:/Users/../SQLiteStudio/dbs/mk_ii.db; Version=3;")
But this way, the .db won't be included when i create an installer. I want to make it something like when i add an image to my Solution Explorer, i can use short address like :
res/img/logo.png --i also have copy of .db file in res/ folder
So, is there any way to include the .db file to my project? I've tried to read current directory and using |DataDirectory|, but all of those referred to the .exe file's active folder, and didn't work when i debugging since when debugging the .exe file have different directory than the project directory.
For a note, i'm using VS Community 2015 and System.Data.SQLite. Also i've tried added the .db file to Solution Explorer, but i can't seem to access through it.