SQL ce replication - CREATE TABLE ???

  • Thread starter Thread starter Ofer B.
  • Start date Start date
O

Ofer B.

I can make a publication in sql Enterprise Manager and than create database
on the device with
// Create the Local SSCE Database subscription

SqlCeReplication.AddSubscription(AddOption.CreateDatabase);

and synchronize it:

// Synchronize to the SQL Server 2000 to populate the Subscription

SqlCeReplication.Synchronize();

But can I make a publication in sql Enterprise Manager
and than create a database and table by code, (tha same tables like the
publication) and than, synchronize the database

string sql = "CREATE TABLE Stocktaking (" +

"Item_code nvarchar (13) NOT NULL ," +

"Item_Quantity int NOT NULL ," +

"rowguid uniqueidentifier NOT NULL )";

oSync.ExecuteCommand(sql); // AND so on for all the tables... and than
synchronize the database

SqlCeReplication.Synchronize();



thanks ofer
 
No. The tables will be dropped and recreated when you go to Synchronize. If
you are looking to only get some of the data down to the device, check out
Merge Replication Filtering.
 
Back
Top