高手帮忙改错误~~
Private Sub BtnSQLServer_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnSQLServer.Click
Dim ErrNumber As Int32
' Connection String to the SQL Server.
'Dim rdaOleDbConnectString As String = "Provider=sqloledb; Data Source=Bread;Initial Catalog=MyPDA;User Id=sa;Password =''"
Dim rdaOleDbConnectString As String = "server=Bread;user id=sa;password=; Database=MyPDA"
' Initialize RDA Object.
Dim rda As SqlCeRemoteDataAccess = Nothing
ErrNumber = 0
Try
'Try the Pull Operation.
rda = New SqlCeRemoteDataAccess
rda.InternetLogin = ""
rda.InternetPassword = ""
rda.InternetUrl = "http://128.158.88.123/SQLCE/sscesa10.dll"
rda.LocalConnectionString = "Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0;Data Source=\My Documents\rrr"
ErrNumber = 1
rda.Push("MyTable", rdaOleDbConnectString, RdaBatchOption.BatchingOn)
MsgBox("连接SQLServer成功啦")
Catch ex As SqlCeException
'Use you own Error Handling Routine.
'ShowErrors(e);
MsgBox(ErrNumber & ex.Message)
Finally
'Dispose of the RDA Object.
rda.Dispose()
End Try
End Sub
功能:PDA的程序连接本机SQLServer数据库,http://128.158.88.123/SQLCE/sscesa10.dll运行正常,数据库运行正常,运行现象为rda.Push出错,提示为The Table is not a tracked table,不明白并且不知道应该怎么弄了~~谢谢