Stig
07-26-2004, 09:33 AM
I am working on pulling data from a sql server database onto an emulated device and using sql ce. I will put the code below but what is happening is there an error about the connection i don't have the error on hand i will post it later but i have no ideas??
The one other is thing that i believe could be a problem is that i can't access my web server from the emulated pocket pc device(internet explorer) i'm not sure how i can set it up(currently looking on the net)
Code
Private strDBFile As String = "My Documents\delivery.sdf"
' The local connection string.
Private strConnLocal As String = "Data Source=My
Documents\delivery.sdf"
' The remote connection string.
Private strConnRemote As String = "Provider=sqloledb; Data
Source=FRANKIE\MIKESQLSERVER; " + _
"Initial Catalog=Deckle;Integrated Security=SSPI; "
' The URL
Private strURL As String
= "http://localhost/pdasqlce/sscesa20.dll"
Private Sub btnPull_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPull.Click
' Create a remote data access object
Dim rdaNW As New SqlServerCe.SqlCeRemoteDataAccess(strURL,
strConnLocal)
Try
' Have RDA:
' Create local tables named Categories and
' ErrorCategories.
' Connect to the remote server and submit the
' SELECT statement.
' Place the results in the local Categories table.
With rdaNW
.LocalConnectionString = strConnLocal
.InternetUrl = strURL
.InternetLogin = ""
.InternetPassword = ""
.Pull("Delivery", "Select * from Person",
strConnRemote, _
sqlServerCe.RdaTrackOption.TrackingOnWithIndexes.TrackingOnWithIndexe
s, "ErrorCategories")
End With
Catch exSQL As SqlServerCe.SqlCeException
MessageBox.Show(exSQL.Message.ToString)
'MsgBox(exSQL)
'HandleSQLException(exSQL)
Finally
rdaNW.Dispose()
End Try
End Sub
So please Any help with this code and how to set the device to access my ISS webserver.
The one other is thing that i believe could be a problem is that i can't access my web server from the emulated pocket pc device(internet explorer) i'm not sure how i can set it up(currently looking on the net)
Code
Private strDBFile As String = "My Documents\delivery.sdf"
' The local connection string.
Private strConnLocal As String = "Data Source=My
Documents\delivery.sdf"
' The remote connection string.
Private strConnRemote As String = "Provider=sqloledb; Data
Source=FRANKIE\MIKESQLSERVER; " + _
"Initial Catalog=Deckle;Integrated Security=SSPI; "
' The URL
Private strURL As String
= "http://localhost/pdasqlce/sscesa20.dll"
Private Sub btnPull_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPull.Click
' Create a remote data access object
Dim rdaNW As New SqlServerCe.SqlCeRemoteDataAccess(strURL,
strConnLocal)
Try
' Have RDA:
' Create local tables named Categories and
' ErrorCategories.
' Connect to the remote server and submit the
' SELECT statement.
' Place the results in the local Categories table.
With rdaNW
.LocalConnectionString = strConnLocal
.InternetUrl = strURL
.InternetLogin = ""
.InternetPassword = ""
.Pull("Delivery", "Select * from Person",
strConnRemote, _
sqlServerCe.RdaTrackOption.TrackingOnWithIndexes.TrackingOnWithIndexe
s, "ErrorCategories")
End With
Catch exSQL As SqlServerCe.SqlCeException
MessageBox.Show(exSQL.Message.ToString)
'MsgBox(exSQL)
'HandleSQLException(exSQL)
Finally
rdaNW.Dispose()
End Try
End Sub
So please Any help with this code and how to set the device to access my ISS webserver.