replication

  • Thread starter Thread starter leo
  • Start date Start date
L

leo

how to solve ??when i synchronize(button event) to sqlce
database to the sql server , it throw the "object disposed
exception" of the replication object , what can i do ?

property(initialization) of replication
<<<
With cerepl
.Publisher = "ME"
.PublisherDatabase = "abc"
.PublisherLogin = "sa"
.PublisherPassword = "123123"
.Publication = "EDS"
.PublisherSecurityMode =
SecurityType.DBAuthentication

.InternetLogin = "sa"
.InternetPassword = "123123"
.InternetUrl
= "http://192.168.2.2/abc/sscesa20.dll"


.Distributor = "ME"
.DistributorLogin = "sa"
.DistributorPassword = "123123"
.DistributorNetwork =
NetworkType.DefaultNetwork
.DistributorSecurityMode =
SecurityType.DBAuthentication

.Subscriber = System.Net.Dns.GetHostName()
.SubscriberConnectionString
= "Provider=Microsoft.SQLServer.OLEDB.CE.2.0;Data Source="
& strConnection
.Validate = ValidateType.NoValidation

.AddSubscription
(AddOption.ExistingDatabase)
' Synchronize to the instance of SQL
Server 2000 to populate the Subscription.
.Synchronize()
'.DropSubscription
(DropOption.LeaveDatabase)

.Dispose()

button event
cerepl.Synchronize() ' error OCCUR
 
sorry , it throw 28521 microsoft sqlce server
exception "the sql server ce database is already enabled
fot replication"

any one can help me .......please
 
leave away the statement addsubscription, this statement
you should run only once for an sdf
 
thanks a lot , frank
i have solved it already

-----Original Message-----
leave away the statement addsubscription, this statement
you should run only once for an sdf
.
 
Back
Top