I'm experiencing a problem with SQL Server Compact: data seems to be added during the session, but disappears after restarting the application. Any advice?
hey, make sure your connection string points to the right file. i once had data vanish because a new db file was created on each launch. try checking if your build or debug settings are re-copying the file every time.
I encountered a similar situation where data did not persist between sessions. The issue was due to the way the application handled the SQL Server Compact database file. Often, when the application restarts, a new instance of the database file is created instead of reusing the existing one. It is important to verify the connection string and ensure that the database file is not being overwritten inadvertently by build settings or file copy actions. Careful configuration of your data persistence strategy can resolve these issues reliably.