高手帮忙改错误~~

lovingkiss 2003-10-21 07:06:29
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,不明白并且不知道应该怎么弄了~~谢谢
...全文
25 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
haoliqi 2003-10-21
  • 打赏
  • 举报
回复
没用过SqlCeRemoteDataAccess
programmeraaron 2003-10-21
  • 打赏
  • 举报
回复
8懂
UP一下
lovingkiss 2003-10-21
  • 打赏
  • 举报
回复
PDA中连接rrr数据库也正常~~两个数据库结构、名称都一样~~

16,552

社区成员

发帖
与我相关
我的任务
社区描述
VB技术相关讨论,主要为经典vb,即VB6.0
社区管理员
  • VB.NET
  • 水哥阿乐
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧