请教各位大侠了,我都被这些弄晕了,看了几天了,就是没找出其中的错误来
VBs程序是这样的:
Sub saveINTOaccess(sstime,ssdata)
Dim objConnection
Dim strConnectionString
Dim lngValue,sysdate,systime
Dim strSQL
Dim objCommand
strConnectionString = "Provider=MSDASQL;DSN=SampleDSN;UID=;PWD=;"
strSQL = "INSERT INTO WINCC_T(TIME,WEIGHT)VALUES('"& sstime &"','"& ssdata &"');"
Set objConnection=CreateObject("ADODB.Connection")
objConnection.ConnectionString = strConnectionString
objConnection.Open
Set objCommand=CreateObject("ADODB.Command")
With objCommand
.ActiveConnection=objConnection
.CommandText=strSQL
End With
objCommand.Execute
Set objCommand=Nothing
objConnection.Close
Set objConnection=Nothing
End Sub
当运行时出现INSERT INTO 语句语法错误,谁能救救我吗,谢谢了