Excel Macro VBA CopyFromRecordSet to retrieve MicroFocus ALM data gives Class doesn't support Automation (Error 430)

211 views Asked by At

I am trying to run a SQL query through Excel VBA to extract MicroFocus ALM data to excel spreadsheet but I am hitting the "Class does not support Automation or does not support expected Interface" error, Error Code 430.

I have enabled the library "Microsoft ActiveX Data Object Recordset 2.8 Library" in the References. After searching for forums I found a suggestion to add the msado15.dll using the below command.

Regsvr32.exe "C:\Program Files\Common Files\System\ado\msado15.dll"

I tried that too, but still the same issue. Below is the code I use and I hit error in the last line where I try to load data to "test" tab. When I add watch on the RecSet variable, I do see that RecSet is loaded with 70 ColCount and 1358 RecordCount after the SQL is executed, but in the last step to load the data to excel I am facing problem. Any help on this is appreciated. Thanks

Set QCConnection = CreateObject("TDApiOle80.TDConnection")

QCConnection.InitConnectionEx qcURL
QCConnection.ConnectProjectEx sDomain, sProject, sUser, sPass

Application.StatusBar = "Logged in ALM as " & sUser

Set com = QCConnection.Command

Sql = "select * FROM BUG"

com.CommandText = Sql
Set RecSet = com.Execute

ThisWorkbook.Sheets("test").Range("A1").CopyFromRecordset RecSet 'Error 430
1

There are 1 answers

1
Sergi On

Install ALM Client or ALM Connectivity Tool from your ALM server:
http://almserver:8080/qcbin/addins.html