Question Database syncronization

NetContractor

New member
Joined
Jan 13, 2009
Messages
2
Programming Experience
10+
What do people recommend for synchronizing to SQL Server 2005 databases.

My application is WPF, VB.NET. both databases are SQL Express 2005, and I use LINQ in code for most of the access (with the odd stored proc when I wanted to go "old school").

The problem is that I need to create a template for a new customer database. When a new customer is created the default values from the database get inserted into a local SQL Express Database, adding a customer Id as a composite key to some customer specific tables. The schema of both databases is the same apart from the additional customerID fields in the target.

One option is to script the inserts; and store the scripts as embedded resources in a setup project. I find that a bit of a hassle for maintenance.
From a maintenance perspective I prefer keeping a template mdf file in a zip, uncompressing, connecting, and importing the data at run time.

So what is the best way to do it? Do I use Linq? or just iterate through all of the tables and copy row by row? Or is there a better way?

THanks.
Report post as abusive
 
Back
Top