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
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