I have been having this issue for days now, can't find anything on google to help me fix this problem, wondered if anyone here can help me.
Firstly I tried to connect directly using SQLConnection but kept getting error: SQL server does not exist or access is denied message.
Connection string was Date Source=MyCompName;Initial Catalog=MyDatabase;User=MyLogin;Password=MyPassword;Integrated Security=SSPI;
So I decided to use the pull method, here is my code:
Public Shared Sub SyncHost()
Dim rda As SqlCeRemoteDataAccess = Nothing
'Connect to SQL 2005
Dim rdaOleDbConnectString As String = _
"Provider=sqloledb; Data Source=MyIPAddress,1433;" & _
"Initial Catalog=atldb;User Id=MyLogin;Password=MyPassword;"
'create an RDA object to connect to the SQL Server CE database on the mobile device:
' Initialize the RDA object.
Try
rda = New SqlCeRemoteDataAccess
rda.InternetUrl = "http://backoffice/sqlce/sqlcesa35.dll"
rda.LocalConnectionString = "Data Source=\My Documents\ATLMobile.sdf"
rda.InternetLogin = "MyLogin"
rda.InternetPassword = "MyPassword"
'Pull from SQL 2005
rda.Pull("Suppliers", "SELECT Supl_ID, Supl_name FROM Supplier_Master ORDER BY Supl_name ", _
rdaOleDbConnectString, _
RdaTrackOption.TrackingOnWithIndexes)
Catch err As SqlCeException
MsgBox(Utility.ComposeSqlErrorMessage(err))
'//If any error occurs then clear the database
If File.Exists("\My Documents\ATLMobile.sdf") Then
File.Delete("\My Documents\ATLMobile.sdf")
End If
Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
rda.Dispose()
End Try
End Sub
I now get an error saying:
A request to send data to the computer running IIS has failed.
Pocket PC is connected via cradle to the computer and has WLAN.
How can I get my PC to connect to connect to my database via IIS or otherwise.
Thanks.
Stuart
Firstly I tried to connect directly using SQLConnection but kept getting error: SQL server does not exist or access is denied message.
Connection string was Date Source=MyCompName;Initial Catalog=MyDatabase;User=MyLogin;Password=MyPassword;Integrated Security=SSPI;
So I decided to use the pull method, here is my code:
Public Shared Sub SyncHost()
Dim rda As SqlCeRemoteDataAccess = Nothing
'Connect to SQL 2005
Dim rdaOleDbConnectString As String = _
"Provider=sqloledb; Data Source=MyIPAddress,1433;" & _
"Initial Catalog=atldb;User Id=MyLogin;Password=MyPassword;"
'create an RDA object to connect to the SQL Server CE database on the mobile device:
' Initialize the RDA object.
Try
rda = New SqlCeRemoteDataAccess
rda.InternetUrl = "http://backoffice/sqlce/sqlcesa35.dll"
rda.LocalConnectionString = "Data Source=\My Documents\ATLMobile.sdf"
rda.InternetLogin = "MyLogin"
rda.InternetPassword = "MyPassword"
'Pull from SQL 2005
rda.Pull("Suppliers", "SELECT Supl_ID, Supl_name FROM Supplier_Master ORDER BY Supl_name ", _
rdaOleDbConnectString, _
RdaTrackOption.TrackingOnWithIndexes)
Catch err As SqlCeException
MsgBox(Utility.ComposeSqlErrorMessage(err))
'//If any error occurs then clear the database
If File.Exists("\My Documents\ATLMobile.sdf") Then
File.Delete("\My Documents\ATLMobile.sdf")
End If
Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
rda.Dispose()
End Try
End Sub
I now get an error saying:
A request to send data to the computer running IIS has failed.
Pocket PC is connected via cradle to the computer and has WLAN.
How can I get my PC to connect to connect to my database via IIS or otherwise.
Thanks.
Stuart