I have this question in which I have a SQL Server Compact Edition database for a desktop application. I am completely new to Sql Server Compact Edition. The question is, does the data inserted in the database persist even if the application is shut down or restarted? Coz I cant seem to find my data when using Sql Server Management Studio to manage the database.
Am I missing anything/something?
EDIT: Is SQL Server Compact Edition used for caching local data only?开发者_运维知识库 We cant use it like what we normally do on Sql Server Express for example managing data using Sql Server Management Studio?
In your project, set the copy options to 'Copy if newer' from 'Copy always'.
If you do a rebuild, it will be deleted as well.
SQL Server Compact Edition is, for the sake of discussion, MS SQL Server squeezed down into a single .DLL for a single user (ok, I know its a bit more complicated than that, but it will do for the sake of discussion).
So data, once written, should be persisted until deleted in pretty much the same way as you'd expect it to be persisted in a server instance.
If data is not being persisted I would wonder what's happening to the data file between invocations.
I'm also not certain whether it can be manipulated using SQL Server Management studio although its an .MDF file.
精彩评论