TA的每日心情 | 开心 2015-8-13 10:14 |
---|
签到天数: 7 天 连续签到: 1 天 [LV.3]测试连长
|
本帖最后由 arvin45 于 2015-7-22 17:25 编辑
如题目所说的,我的脚本如下:
Dim Sql_Connection,Sql_Command, Obj_Excel,Obj_EData
Sql_Connection="DSN=Excel Files;DBQ="&Environment.Value("TestDir")&"\..\cases\"&ExcelFile&".xlsx"
Sql_Command="Select * From ["&Sheetname&"$]"
Set Obj_Excel=CreateObject("ADODB.Connection")
Obj_Excel.Open Sql_Connection
Set Obj_EData=CreateObject("ADODB.Recordset")
Obj_EData.Open Sql_Command, Obj_Excel, 2, 2
Obj_EData.MoveFirst
While Not Obj_EData.EOF
If Obj_EData.Fields("OperateType").Value = "AddEvent" Then
Obj_EData.Fields("Status").Value = "Running"
Obj_EData.Update
End If
Obj_EData.MoveNext
Wend
ClearObject
运行QTP会弹出提示框,如图所示,请问如何解决呢
|
|