views:

64

answers:

2

Hi guys, 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?

+1  A: 

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.

leppie
but still i cant see the data in the table. so is sql server compact edition only for caching purposes? i mean, you cant use it like sql server express where you can manage data at the sql server management studio?
jerbersoft
No, it works just like SQL, it is persisted storage, not just caching. (else our app wont even work!)
leppie
+1  A: 

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.

Murph