Amir
Amir

Reputation: 820

Embedding SQL Server CE database into a C# application

I'm developing a program which uses SQL Server Compact Edition for processing data. We all know that this creates a .sdf file in output (SQL Server CE database File).

My question is if there is anyway to embed this .sdf file into the executable?

Thanks in advance.

Upvotes: 2

Views: 951

Answers (1)

Jethro
Jethro

Reputation: 5916

You could add the .sdf file to a Resources File .resx and then when your application starts you can just copy it out of your Resources and create it, if it doesn't already exist.

Upvotes: 1

Related Questions