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?
T开发者_JAVA技巧hanks in advance.
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.
精彩评论