SQL Server CE Data Connectivity

nks

New member
Joined
Aug 17, 2004
Messages
1
Programming Experience
Beginner
Hi,
some one please help me
since 2 days im struggling hard to just make the connection work, but till now im not able to get it done. I just copied the example code for pull method from msdn still not working. I tested my SQL Server virtual directory configuration. and is fine. This is the error im getting
===========================
SQL Server CE encountered problems in opening the SQL Server CE database
===========================
COde
Private Sub btnPull_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPull.Click
' If File.Exists("\My Download\sssce.sdf") Then
'File.Delete("\My Download\sssce.sdf")
' End If
'Dim sqlEngine As New SqlCeEngine("Data Source=\My Download\sssce.sdf")
'sqlEngine.CreateDatabase()

Dim rdaOleDbConnectString As String = "Provider=sqloledb; Data Source=NARESH;Initial Catalog=NorthWind; User ID=;Password="
Dim rda As SqlCeRemoteDataAccess = Nothing
Try
rda = New SqlCeRemoteDataAccess
rda.InternetLogin = ""
rda.InternetPassword = ""
rda.InternetUrl = "http://NARESH/SQLCE/sscesa20.dll"
rda.LocalConnectionString = "Provider=Micrsoft.SQLSERVER.OLEDB.CE.2.0;Data Source=My Downloadsssce.sdf"
rda.Pull("Employees", "Select * from Employees", rdaOleDbConnectString, RdaTrackOption.TrackingOnWithIndexes, "ErrorTable")
MsgBox("Pull Operation Completed", MsgBoxStyle.Information, "Pull")
Catch ex As SqlCeException
MessageBox.Show(ex.Message)
Finally
rda.Dispose()
End Try
End Sub
=====================

On searching google i understood that the problem is with the connection string or SQL Server 2000 user account. I didnt find much info about this error. Please someone who knows about pocket pc development help me out. I need to finish this project asap. I searched all the forums and articles but could able to fix it. It would be very very greatfull if someone can guide me thru in SQL Server CE Database connectivity.

Thank You,
NKS
 
Back
Top