高手帮帮忙啊!我用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
你的sql server ce安装OK?
在ie的地址栏中输入http://localhost/sscesa20.dll会出现什么信息?
会出现下载提示框。
sql server ce 没有问题,我可以建数据库,可以添数据、show数据