In my C# windows app using sqlite database, i observed each time i run the application and insert new records into the database, the records will be saved as long as the application is still running, but when i stopped the application, the records will be wiped out(deleted) from the database while using this connection string:
<add name="PITADatabaseConnectionString" connectionString="Data Source=|DataDirectory|\App_Data\PITApplication.SQLite3Db; Version=3;" providerName="System.Data.Sqlite" />
When i change the connection string to:
<add name="PITADatabaseConnectionString" connectionString="Data Source=C:\SqLite\Gui\SQLiteStudio\PITApplication.SQLite3Db; Version=3;"
providerName="System.Data.Sqlite" />
and save new records, it will be saved permanently and not deleted. I don't know what the issue is, i added the database to a folder in my application through add new items context menu, after adding the database to my application i set Build Action property to Content, and Copy to output directory property to Copy always.
i will appreciate your kind assistance.