Merge Replication SQL 2000 and SQL Server Compact

  • Thread starter Thread starter JB
  • Start date Start date
J

JB

I have a desktop application using SQL Server Compact Edition and I
want to use merge replication with an SQL Server 2000 database (SP4).

I have installed all the necessary things (sqlcesa30.dll is available
via IIS and displays the message: "Microsoft SQL Server Compact
Edition Server Agent" as expected, when I use a web browser from the
desktop to navigate to it).

I have configured publishing, without any issues arrising, the
publisher and subscriber apparently being created without problem and
the snapshot data is entered into the snapshot shared folder.

My problem is that I cannot get my VB.NET application to synchronize,
I catch the exception thrown by:
SqlServerCe.SqlCeReplication.Synchronize(), but I am just getting a
blank error message.

Can anyone suggest what might be wrong?

Thanks.
 
Problem solved, I had a couple of problems:

i) I was not naming the SQL instance name in the replication.Publisher
(i.e. I had repl.Publisher = "Servername" , where it should have been
repl.Publisher = "Servername\SQLInstanceName")

ii) the sdf file need to be created with
repl.AddSubscription(SqlServerCe.AddOption.CreateDatabase) before
synchronizing, also taking care here only to do this if the file does
not exist.
 
Back
Top