51Testing软件测试论坛

标题: QTP中调式AddBug到TD中创建TD控件对象时候报错,不知道有谁遇到过? [打印本页]

作者: Weblogic    时间: 2010-12-2 15:40
标题: QTP中调式AddBug到TD中创建TD控件对象时候报错,不知道有谁遇到过?
代码如下:
' '连接到TD控件
Set tdc = CreateObject("TDAPIOLE.TDConnection")

tdc.InitConnection("http://xxxxx/tdbin")
' If (tdc.Connected = False) Then
'  
' End If
'连接到TD,用用户名和密码

call tdc.ConnectProject( "xxx", "xxx", "xxx")
set BugFactory = tdc.BugFactory
'Add a new empty bug
'连接到TD命令,查询出TD的defetid.
Set com = tdc.Command
     com.CommandText = "select SQ_SEQ_VALUE from SEQUENCES where SQ_SEQ_NAME='BUG'"
Set recSet = com.Execute
    gettdid = CInt(recSet.FieldValue(0))
' msgbox gettdid
'set Bug = BugFactory.AddItem(gettdid)
Set Bug=BugFactory.AddItem(gettdid)
'fill the bug with relevant parameters
Bug.Status = "New"
Bug.Summary = Summary
Bug.Priority = "4-Very High" ' depends on the DB
Bug.AssignedTo = "admin" ' user that must exist in the DB's users list
Bug.DetectedBy = "jiangsf" ' user that must exist in the DB's users list
Bug.Field("BG_DESCRIPTION")= Description
'Post the bug to DB ( commit )
Bug.Post()
TDC.ReleaseConnection()


其中调式到Set tdc = CreateObject("TDAPIOLE.TDConnection")这行的时候报
“General run error”  在调试状态下
使用命令
msgbox err.number
msgbox describeresult(err.number)
最后显示问题为“DLL中出错”

这里不明白这个DLL具体是指什么问题?

不知道各位有没有遇到过这个问题??
作者: TIB    时间: 2010-12-3 15:02
TD插件装了吗?
作者: Weblogic    时间: 2010-12-8 16:26
TD插件装了的,一开始运行的时候是可以的,但TD重启后就出现这个问题,这个是TD插件的问题吗?
作者: testlab    时间: 2010-12-8 16:34
tdc = CreateObject("TDApiOle80.TDConnection")




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2