Hi to All,
I am using Windows XP running IIS 6.0.I am developing a project using vb.net 1.1 with SQL Server 2000.It is a mobile project.So i am also using Pocket PC 2002 with SQL CE 2.0.When I want to Pull the table from SQL Server 2000 to SQL CE the following error will be occured.
The Error is the request to send data to the computer running IIS has failed. for more information see HRESULT.MS Active Sync4.0 also been installed in my s/m.I have been run this project Pocket PC 2002 Emulator. The database also been stored in my s/m.
Any One can help Me to solve this Problem ?
Private ssceConn As SqlCeConnection = Nothing
Private strDataSource As String
Friend rdaOleDbConnect String As String
' Initialize the RDA object.
Friend rda As SqlCeRemoteData Access = Nothing
'Find Application Path
Friend runtimeFolder As String = System.IO.Path. GetDirectoryNam e(System.Reflec tion.Assembly.G etExecutingAsse mbly().GetName( ).CodeBase)
Private Sub CreateLocalData base_ServerConn ection()
Dim sqlEngine As New SqlCeEngine("Da ta Source=" + runtimeFolder + "\mobiledb.sdf" )
sqlEngine.Creat eDatabase()
MsgBox("Databas e Created")
rdaOleDbConnect String = "Provider=sqlol edb; Data Source=GOFRUGAL-FD468D;Initial Catalog=Mobiled b;User Id=sa;Password= sa"
rda = New SqlCeRemoteData Access("http://192.168.1.90/karuna/sscesa20.dll", "Administrator" , "GFT", "Data Source=" + runtimeFolder + "\mobiledb.sdf" )
Call TablePull()
End Sub
Private Sub TablePull()
Try
rda.Pull("toche ck", "SELECT * FROM tocheck", rdaOleDbConnect String, RdaTrackOption. TrackingOffWith Indexes, "ErrorTable ")
rda.Pull("while check", "SELECT * FROM whilecheck", rdaOleDbConnect String, RdaTrackOption. TrackingOffWith Indexes, "ErrorTable ")
MsgBox("Smart Device pull Succeeded.")
Catch Errstr As SqlCeException
Dim i As Integer
For i = 0 To Errstr.Errors.C ount - 1
MsgBox(Errstr.E rrors(i).ToStri ng)
Next
Finally
rda.Dispose()
End Try
End Sub
Private Sub Button1_Click_1 (ByVal sender As System.Object, ByVal e As System.EventArg s) Handles Button1.Click
Dim MsgResult As Boolean
If File.Exists(run timeFolder + "\mobiledb.sdf" ) Then
MsgResult = MsgBox("Continu e Existing Data!", MsgBoxStyle.Que stion.YesNo, "Data Pull From Server") = MsgBoxResult.Ye s
If MsgResult = False Then
File.Delete(run timeFolder + "\mobiledb.sdf" )
Call CreateLocalData base_ServerConn ection()
End If
Else
Call CreateLocalData base_ServerConn ection()
End If
End Sub
I am using Windows XP running IIS 6.0.I am developing a project using vb.net 1.1 with SQL Server 2000.It is a mobile project.So i am also using Pocket PC 2002 with SQL CE 2.0.When I want to Pull the table from SQL Server 2000 to SQL CE the following error will be occured.
The Error is the request to send data to the computer running IIS has failed. for more information see HRESULT.MS Active Sync4.0 also been installed in my s/m.I have been run this project Pocket PC 2002 Emulator. The database also been stored in my s/m.
Any One can help Me to solve this Problem ?
Private ssceConn As SqlCeConnection = Nothing
Private strDataSource As String
Friend rdaOleDbConnect String As String
' Initialize the RDA object.
Friend rda As SqlCeRemoteData Access = Nothing
'Find Application Path
Friend runtimeFolder As String = System.IO.Path. GetDirectoryNam e(System.Reflec tion.Assembly.G etExecutingAsse mbly().GetName( ).CodeBase)
Private Sub CreateLocalData base_ServerConn ection()
Dim sqlEngine As New SqlCeEngine("Da ta Source=" + runtimeFolder + "\mobiledb.sdf" )
sqlEngine.Creat eDatabase()
MsgBox("Databas e Created")
rdaOleDbConnect String = "Provider=sqlol edb; Data Source=GOFRUGAL-FD468D;Initial Catalog=Mobiled b;User Id=sa;Password= sa"
rda = New SqlCeRemoteData Access("http://192.168.1.90/karuna/sscesa20.dll", "Administrator" , "GFT", "Data Source=" + runtimeFolder + "\mobiledb.sdf" )
Call TablePull()
End Sub
Private Sub TablePull()
Try
rda.Pull("toche ck", "SELECT * FROM tocheck", rdaOleDbConnect String, RdaTrackOption. TrackingOffWith Indexes, "ErrorTable ")
rda.Pull("while check", "SELECT * FROM whilecheck", rdaOleDbConnect String, RdaTrackOption. TrackingOffWith Indexes, "ErrorTable ")
MsgBox("Smart Device pull Succeeded.")
Catch Errstr As SqlCeException
Dim i As Integer
For i = 0 To Errstr.Errors.C ount - 1
MsgBox(Errstr.E rrors(i).ToStri ng)
Next
Finally
rda.Dispose()
End Try
End Sub
Private Sub Button1_Click_1 (ByVal sender As System.Object, ByVal e As System.EventArg s) Handles Button1.Click
Dim MsgResult As Boolean
If File.Exists(run timeFolder + "\mobiledb.sdf" ) Then
MsgResult = MsgBox("Continu e Existing Data!", MsgBoxStyle.Que stion.YesNo, "Data Pull From Server") = MsgBoxResult.Ye s
If MsgResult = False Then
File.Delete(run timeFolder + "\mobiledb.sdf" )
Call CreateLocalData base_ServerConn ection()
End If
Else
Call CreateLocalData base_ServerConn ection()
End If
End Sub
Comment