Skuta
Skuta

Reputation: 5860

How to prevent SQL Compact DB to be erased?

I'm developing an applciation using SQL Compact database in Visual Studio 2008. When I start the application and run the process, the data is being loaded into database for few hours worth of few tens of megabytes. However, when I quite debugging, change something in code (not in DB structure), run the project again, the database is erased.

Does anyone know how to prevent this behavior? I need the data to stay in DB to test on it.

Upvotes: 0

Views: 69

Answers (1)

Hans Passant
Hans Passant

Reputation: 941317

Did you add the database file to your project? Select it and in the Properties window change its Copy property from Always to If Newer.

Upvotes: 1

Related Questions