replication

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
 
G

Guest

sorry , it throw 28521 microsoft sqlce server
exception "the sql server ce database is already enabled
fot replication"

any one can help me .......please
 
F

Frank

leave away the statement addsubscription, this statement
you should run only once for an sdf
 
G

Guest

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
.
 

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