在我的电脑中添加数据源连接到vfp的一个表单中,然后在WINCC 中加入以下代码用于将某数据写入vfp表单中
Dim strConnectionString
Dim strSql
Dim objConnection
Dim objCommand
strConnectionString="Provider=MSDASQL.1;Persist Security Info=False;Data Source=vfpData;"
strSQL="INSERT INTO jjzk(????) Values ("& 34.05 &");"
Set objConnection=CreateObject("ADODB.Connection")
objConnection.ConnectionString=strConnectionString
objConnection.Open
Set objCommand=CreateObject("ADODB.Command")
With objCommand
.Active Connection=objConnection
.CommandText=strSql
End With
objCommand.Excute
Set objCommand=Nothing
objConnection.Close
Set objConnection=Nothing
请各位大大帮我看看有错没,因为执行代码时也不报错但就是写不进数