F
fookyuan
Hi,
I have problems replicating a database to the SQL CE and my codes are
like this
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
Dim strDataSource = "My Documents\dbDataLogger.SDF"
Dim repl As SqlCeReplication = Nothing
repl = New SqlCeReplication
repl.Publisher = "MPG-001"
repl.PublisherLogin = "sa"
repl.PublisherPassword = ""
repl.Publication = "dbDataLogger"
repl.PublisherDatabase = "dbDataLogger2"
repl.InternetUrl = "http://mpg-001/sscePubs/sscesa20.dll"
repl.InternetLogin = ""
repl.InternetPassword = ""
repl.Subscriber = "Sub1"
repl.SubscriberConnectionString =
"Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0;Data Source=" &
strDataSource
If System.IO.File.Exists(strDataSource) = False Then
repl.AddSubscription(AddOption.CreateDatabase)
Me.Refresh()
End If
repl.Synchronize() <---- ERROR HAPPENS HERE
End Sub
ERROR RECEIVED
==============
An unhandled exception of type
'System.Data.SqlServerCe.SqlCeException' occurred in
System.Data.SqlServerCe.dll
Additional information: SqlCeException
I've checked the merge agent on my SQL 2000 Svr and looks like it's
trying to merge the database with CE SQL but is unable to find the
subscriber. How do you create the subsribe on the handheld? Which is
anonymous ??
I have problems replicating a database to the SQL CE and my codes are
like this
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
Dim strDataSource = "My Documents\dbDataLogger.SDF"
Dim repl As SqlCeReplication = Nothing
repl = New SqlCeReplication
repl.Publisher = "MPG-001"
repl.PublisherLogin = "sa"
repl.PublisherPassword = ""
repl.Publication = "dbDataLogger"
repl.PublisherDatabase = "dbDataLogger2"
repl.InternetUrl = "http://mpg-001/sscePubs/sscesa20.dll"
repl.InternetLogin = ""
repl.InternetPassword = ""
repl.Subscriber = "Sub1"
repl.SubscriberConnectionString =
"Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0;Data Source=" &
strDataSource
If System.IO.File.Exists(strDataSource) = False Then
repl.AddSubscription(AddOption.CreateDatabase)
Me.Refresh()
End If
repl.Synchronize() <---- ERROR HAPPENS HERE
End Sub
ERROR RECEIVED
==============
An unhandled exception of type
'System.Data.SqlServerCe.SqlCeException' occurred in
System.Data.SqlServerCe.dll
Additional information: SqlCeException
I've checked the merge agent on my SQL 2000 Svr and looks like it's
trying to merge the database with CE SQL but is unable to find the
subscriber. How do you create the subsribe on the handheld? Which is
anonymous ??