I have a SQL Server database and want to migrate it to a SQL Compact database. How do I 开发者_开发问答do that?
Thnx for help.
Erik EJ's blog has useful SQL CE resources, including his Export2SqlCe tool.
I'd recommend SQL Server's 'Generate Scripts' command (Right click database, Tasks->Generate Scripts). This will build a script of DDL statements for the objects that you choose. Optionally you can include data within those tables to be scripted.
The resulting scripts can be run within Visual Studio against your .sdf.
Be warned though of some datatypes that SQL Compact doesn't support.
精彩评论