Quantcast
Channel: Quality Center / ALM Practitioners Forum topics
Viewing all articles
Browse latest Browse all 5491

Unable to post business component parameter using OTA

$
0
0

Hello Experts,

 

I am trying to create a business component in HP ALM 11.00 using OTA with below code.

However I am getting an attached error "Failed to post Simple key entity" when I tri to post the parameter to the component (at line objQcComponentParam.Post).

 

I am sure that the code is good as it is working fine in few machines but not mine :(

 

Could you please let me know what could be the issue.

 

'=========================================================================
Set objQcConnection = CreateObject("TDApiOle80.TDConnection.1")

objQcConnection.InitConnectionEx "<QC URL>"
objQcConnection.Login "<Username>","<PassworD>"
objQcConnection.Connect "<Domain>","<Project>"

 

     Dim objQcComponentFolderFactory : Set objQcComponentFolderFactory = objQcConnection.ComponentFolderFactory
     

    strComponentPath = "Components\Data_Components"
     
     Dim objQcComponentFolder : Set objQcComponentFolder = objQcComponentFolderFactory.FolderByPath(strComponentPath)
     Dim objQcComponentFactory : Set objQcComponentFactory = objQcComponentFolder.ComponentFactory
     Dim objQcComponent : Set objQcComponent = objQcComponentFactory.AddItem(Null)
    
     objQcComponent.Name = "VBS Component"
     objQcComponent.Field("CO_DESC") = "Dummy Component created by vb script"
     objQcComponent.ScriptType = "QT-SCRIPTED"

     objQcComponent.Post
    
     Dim objQcComponentParamFactory : Set objQcComponentParamFactory = objQcComponent.ComponentParamFactory

         Set objQcComponentParam = objQcComponentParamFactory.AddItem(Null)
         objQcComponentParam.IsOut = 0  
         objQcComponentParam.Name = "Parameter1"
         objQcComponentParam.Desc = "Dummy"
         objQcComponentParam.ValueType = "String"
         objQcComponentParam.Order = 1        
        objQcComponentParam.Post
      

   objQcComponent.Post
     
     
      'Release all objects
      Set objQcComponentParam = Nothing
      Set objQcComponentParamFactory = Nothing
      Set objQcComponent = Nothing
      Set objQcComponentFactory = Nothing
      Set objQcComponentFolder = Nothing
      Set objQcComponentFolderFactory = Nothing
      Set objQcConnection = Nothing

'=========================================================================

 

Thanks & Regards,

~Manish


Viewing all articles
Browse latest Browse all 5491

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>