Create .mdf/.sdf database dynamically

后端 未结 7 966
萌比男神i
萌比男神i 2020-12-29 11:21

How can I with \"code\" create a new .mdf/.sdf database?

I\'ve tried this: http://support.microsoft.com/kb/307283

All it does is fail on the ConnectionString

7条回答
  •  孤独总比滥情好
    2020-12-29 12:22

    Regarding .sdf files (SQL Server CE), you can use the SqlCeEngine class to create a new database, as described in this MSDN article.

提交回复
热议问题