i am develop an application for the pocket pc that can retrieve the data from sql server 2000 to sql server ce. can someone guide me how to do ?
i have follow the website :http://samples.gotdotnet.com/quickst...pactFramework/
i have a problem in the coding below:
VB Code:
Dim repl As SqlCeReplication = Nothing Try repl = New SqlCeReplication 'Set the properties using data from the UI. repl.Publisher = txtPublisher.Text repl.PublisherLogin = txtUserID.Text repl.PublisherPassword = txtPassword.Text repl.InternetUrl = txtInternetURL.Text repl.InternetLogin = txtInternetID.Text repl.InternetPassword = txtInternetPassword.Text repl.Subscriber = txtSubscription.Text repl.Publication = txtPublication.Text repl.PublisherDatabase = txtDatabase.Text strDataSource = txtFileName.Text ssceConn.ConnectionString = "Data Source =" + strDataSource repl.SubscriberConnectionString = _ "Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0;Data Source=" _ + strDataSource 'If the file does not exist, create it, and add it as a subscription. While System.IO.File.Exists(strDataSource) = False If MessageBox.Show("The file does not exist, do you want to create it?", _ "Merge", MessageBoxButtons.YesNo, MessageBoxIcon.Asterisk, _ MessageBoxDefaultButton.Button1) = DialogResult.Yes Then repl.AddSubscription(AddOption.CreateDatabase) Me.Refresh() End If End While 'Synchronize. repl.Synchronize() Catch err As SqlCeException 'Add error handling code here. Finally repl.Dispose() End Try
and the coding below is how i set:
VB Code:
Try repl = New SqlCeReplication 'Set the properties using data from the UI. repl.Publisher = "dievechnology" repl.PublisherLogin = "sa" 'repl.PublisherPassword = " " repl.InternetUrl = "http://localhost/Testing/sscesa20.dll" 'repl.InternetPassword = " " repl.Subscriber = "MySubscriber" repl.Publication = "DIEVECHNOLOGY\Keen" repl.PublisherDatabase = "Sean" strDataSource = "\My Documents\Sean" ssceConn.ConnectionString = "Data Source =" + strDataSource repl.SubscriberConnectionString = _ "Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0;Data Source=" _ + strDataSource 'If the file does not exist, create it, and add it as a subscription. While System.IO.File.Exists(strDataSource) = False If MessageBox.Show("The file does not exist, do you want to create it?", _ "Merge", MessageBoxButtons.YesNo, MessageBoxIcon.Asterisk, _ MessageBoxDefaultButton.Button1) = DialogResult.Yes Then repl.AddSubscription(AddOption.CreateDatabase) Me.Refresh() End If End While 'Synchronize. repl.Synchronize() Catch err As SqlCeException 'Add error handling code here. MessageBox.Show(Err.Message) Finally repl.Dispose() End Try
it keeps saying "a request to send data to the computer running iis has failed. for more information see hresult."




Reply With Quote