Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ActiveX component can't create object: 'TDApiOle80.TDConnection' 1

Status
Not open for further replies.

jasonhuibers

Programmer
Sep 12, 2005
290
CA
I am able to successfully execute the following code as an excel macro. However I wanted to be able to run this code using vbscript. When I run this from my html page I encounter:

Microsoft VBScript runtime error '800a01ad'

ActiveX component can't create object: 'TDApiOle80.TDConnection'

on this line: Set tdc = CreateObject("TDApiOle80.TDConnection")




<BODY onload="vbscript:Call Hello()">

<SCRIPT language=VBScript>
sub Hello()
msgbox "Hello"
Set tdc = CreateObject("TDApiOle80.TDConnection")
tdc.InitConnectionEx " tdc.Login "admin", "Password"
tdc.Connect "Domain", "Project"
msgbox("Defect Raised")

'============================================
Set BugFactory = tdc.BugFactory
Set BugFilter = BugFactory.Filter
BugFilter.Filter("BG_BUG_ID") = DefectID
Set BugList = BugFilter.NewList
Set myBug = BugList.Item(1)

Set myBug = BugFactory.AddItem(Null)

'Enter values for required fields
myBug.Field("BG_STATUS") = "New" 'Status
myBug.Field("BG_Responsible") = "steveh" 'Assigned to

myBug.Field("BG_Priority") = "Minor"
myBug.Field("BG_User_12") = "ALL"
myBug.Field("BG_User_11") = "Access"
myBug.Field("BG_Subject") = "1"
myBug.Post
msgbox("Defect Raised")
end sub
 
A quick google search on TDApiOle80 shows that you may need to use the 32-bit version of wscript (or cscript, whichever you use). These can be found in the c:\Windows\SysWOW64 folder.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top