[英]Embedding SQL Server CE database into a C# application
I'm developing a program which uses SQL Server Compact Edition for processing data. 我正在开发一个使用SQL Server Compact Edition处理数据的程序。 We all know that this creates a
.sdf
file in output (SQL Server CE database File). 我们都知道这会在输出中创建一个
.sdf
文件(SQL Server CE数据库文件)。
My question is if there is anyway to embed this .sdf
file into the executable? 我的问题是是否有将这个
.sdf
文件嵌入可执行文件的方法?
Thanks in advance. 提前致谢。
您可以将.sdf
文件添加到资源文件.resx
,然后在应用程序启动时将其复制到资源中并创建(如果尚不存在)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.