Search code examples
c#copyschemasql-server-ce

How to copy database schema to enother database using SQL Server Compact in C#?


I want to copy programmatically the SQL Server Compact database (.sdf file) into another database (.sdf file) using C#.

Just schema without data (I mean creating empty database with same schema)

Is it possible? If so, how can I do this?


Solution

  • Have a empty (template) database file handy, and copy it when required.