求救!evb下我的RDA连接出错

snowmoonsad   2007-4-17 09:37 楼主
高手帮帮忙啊!我用RDA执行PULL时出现错误提示:An error was encountered wile running this program.
我的代码:
Public Const strInternetURL = "http://localhost/sscesa20.dll"
Public Const strRemoteConnect = "Provider=SQLOLEDB.1;Persist Security Info=False;data source=huang;Initial Catalog=MealPOS;user id=sa;password=sa"
Public Const strLocalConnect = "Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0; data source=\PDATest.sdf"

Private Sub Command1_Click()
  Dim strSQL As String
  strSQL = "SELECT * from MealList"
   Dim ceRDA As SSCE.RemoteDataAccess
   Set ceRDA = CreateObject("SSCE.RemoteDataAccess.2.0")
   ceRDA.InternetURL = strInternetURL
   ceRDA.LocalConnectionString = "data source=\PDATest.sdf"
   Call DeleteTab
   ceRDA.Pull "tbTestA", strSQL, strRemoteConnect
   Set ceRDA = Nothing
End Sub

Private Sub DeleteTab()
On Error Resume Next
    Dim cn As ADOCE.Connection
    Set cn = CreateObject("ADOCE.Connection.3.1")
    cn.ConnectionString = strLocalConnect
    cn.Open
    Dim SQL As String
    SQL = "drop table tbTestA"
    cn.Execute SQL
    cn.Close
    Set cn = Nothing
End Sub

回复评论 (4)

没人帮我吗?高手帮帮我啊!不甚感激!
点赞  2007-4-17 10:33
VB不懂啊,呵呵~
点赞  2007-4-17 18:58
你的sql server ce安装OK?
在ie的地址栏中输入http://localhost/sscesa20.dll会出现什么信息?
点赞  2007-4-18 15:26
会出现下载提示框。
sql server ce 没有问题,我可以建数据库,可以添数据、show数据
点赞  2007-4-21 10:26
电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 京公网安备 11010802033920号
    写回复