Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE
sushant0404 Absent Member.
Absent Member.
4818 views

Unable to connect to QC using VB Script

Hi All,

I am unable to connect to QC using VB script .

I was Using my local machine ,using which i was able to connect to qc using vb script ,now my machine has been transfered into Iwin machine .

Error shown is ActiveX component Can't Create Object:'TDApiOle80>TDConnection'

Code: 800A01AD

Code I USe is

 

Dim QCConnection
Set QCConnection = CreateObject("TDApiOle80.TDConnection")
Dim UserName, Password
UserName =

Password =

QCConnection.InitConnectionEx "https://qc.msdwis.com/qcbin"
QCConnection.Login UserName, Password

 

 

Please HEPL...

0 Likes
4 Replies
Absent Member.. visit_alok Absent Member..
Absent Member..

Re: Unable to connect to QC using VB Script

Please ensure that you have the QC/ALM client component downloaded and registered into your local machine from where you are trying to run the code.

 

The basic code to connect to project is

 

   Set Connection = CreateObject("TDApiOle80.TDConnection")
   Connection.InitConnectionEx [ServerURL]
   Connection.Login [QC user id], [Password]

   Connection.Connect [Domain Name], [Project Name]

Please note :- Any solution or queries expressed in my postings are mine alone, and do not reflect the opinions of my employer.
0 Likes
Highlighted
Hanuman_U Absent Member.
Absent Member.

Re: Unable to connect to QC using VB Script

Sushant,

 

are you using excel vba or .vbs file.

I do not think we can use .VBS file. If you are using excel and getting the error , check the Tools > References >

Check whether OLE Automation, OTA Com Type library were selected or not.

 

if they are not selected , check them  and move them to top, using Priority button.

 


Regards,
Hanumanth
0 Likes
HPalmUser Absent Member.
Absent Member.

Re: Unable to connect to QC using VB Script

Here's the function I use to connect to my HP ALM 11 instance, atleast in VBA:

Function getConnection() As TDConnection

    ' VARIABLE CONNECTIONS
    Dim QC_URL As String
    Dim qcUsername As String
    Dim qcPassword As String
    Dim qcDomain As String
    Dim qcProject As String
    Dim conn As New TDConnection
    
    
    ' SET ITEMS UP
    QC_URL = "https://almurl.com/qcbin"
    qcUsername = "user"
    qcPassword = "pass"
    qcDomain = "DOMAIN"
    qcProject = "PROJECT"
    conn.InitConnectionEx QC_URL
    conn.Login qcUsername, qcPassword
    conn.connect qcDomain, qcProject
    
    Set getConnection = conn


End Function

 Of course as Hanuman says, make sure OTA COM Type Library is checked in the References.

0 Likes
roddywang Absent Member.
Absent Member.

Re: Unable to connect to QC using VB Script

Please deploy QC client in new machine first.
[If this post solves or helps solve your issue, mark the thread as solved and give KUDOS to the author for their assistance.]

(Opinions expressed in my postings are mine alone, and do not reflect the opinions of my employer.No warranties express or implied for any solution/suggestion posted.)
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.