以编程方式创建SQL Server CE数据库文件 [英] Create SQL Server CE database file programmatically
本文介绍了以编程方式创建SQL Server CE数据库文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何以编程方式创建新的SQL Server Compact数据库文件(.sdf),而无需复制现有的模板文件?
How can I create a new SQL Server Compact database file (.sdf) programmatically, without having an existing template file to copy from?
推荐答案
这里有一些好的信息:使用C#创建SQL Server Compact Edition数据库
There is some good info here: Create a SQL Server Compact Edition Database with C#
string connectionString = "DataSource=\"test.sdf\"; Password=\"mypassword\"";
SqlCeEngine en = new SqlCeEngine(connectionString);
en.CreateDatabase();
这篇关于以编程方式创建SQL Server CE数据库文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文