Copy a SQL Server Database to .SDF file using C#
I have a SQL Server running on my local network, and want to be able to check out a loca开发者_开发问答l copy of it as an SDF file to work with on the move. Is this possible to do in C#?
I have fiddled with the following and think it should meet your needs.
http://sqlcetoolbox.codeplex.com/
I became aware of it while conversing this similar question:
SQL to SQL CE: How to read an SQL or Access database and write it out as SQL CE database?
Note with the codeplex project you have access to the add-in which will give you the end result you are looking for, or the source code - if you only want to see the code.
精彩评论