SQL ce replication - CREATE TABLE ???

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
 
B

Brad Syputa - MS

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top