在" Event = resultSet(3)"收到错误

时间:2014-12-11 17:38:03

标签: vbscript qtp

无法找出行中的语法错误" Event = resultSet(3)"

函数Run_Test_Flow(str_TestCaseID,str_flowTable_Name)

Set con = CreateObject("ADODB.Connection")
con.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0; Persist Security Info=False; data source=C:\Datasource\DataBase.accdb"
con.Open
sqlQuery = "SELECT * FROM " & str_flowTable_Name & " WHERE TC_Name = '" & str_TestCaseID & "'"

Set resultSet = con.Execute (sqlQuery)

While Not resultSet.EOF
    MsgBox(resultSet(3))
    Event = resultSet(3)

    Object = Split(CStr(resultSet(4)),",")

    Eval(Event & "(Object)")

    resultSet.MoveNext()
Wend

结束功能

1 个答案:

答案 0 :(得分:2)

'事件'是VBScript中的保留关键字。您不能将其用作变量。