Results 1 to 3 of 3

Thread: Construct string in COM+ package

  1. #1
    michail Guest

    Construct string in COM+ package

    How can I set Construct string( which is on Activation tab) in COM+ installation?

  2. #2
    Join Date
    May 2002
    Location
    Dublin, Éire
    Posts
    453
    You need to navigate through COMAdmin for this

    code for reference only..

    svAppID is the COM+ application ID guid
    svClsID is the class ID of the dll to update with the constructor str.

    Code:
    Set objCatalog = CreateObject("COMAdmin.COMAdminCatalog")
        Set objAppColl = objCatalog.GetCollection("Applications")
        objAppColl.Populate
    '// Update ComCatalog
            For i = 0 To objAppColl.Count - 1
                If objAppColl.Item(i).Key = svAppID Then
                    Set objCmptColl = objAppColl.GetCollection("Components", svAppID)
                    objCmptColl.Populate
                    For j = 0 To objCmptColl.Count - 1
                        If objCmptColl.Item(j).Key = svClsID Then
                            If Not IsNull(svConstruct) Then
                                Set objCmpt = objCmptColl.Item(j)
                                objCmpt.Value("ConstructionEnabled") = True
                                objCmpt.Value("ConstructorString") = svConstruct
                                objCmptColl.SaveChanges
                                
                                objLog.WriteLine "	Updated Class " & svClsID & " in " & svAppID
                                objLog.WriteLine "		Construction Enabled with """ & svConstruct & """"
                            End If
                            Exit For
                        End If
                    Next
                    Exit For
                End If
            Next
    Neal
    Epionet Ltd
    Dublin
    Éire

    -- SOA Architects --

  3. #3
    michail Guest

    Thumbs up

    Thanks. Right in the point.
    Michail
    Originally posted by Keppler
    You need to navigate through COMAdmin for this

    code for reference only..

    svAppID is the COM+ application ID guid
    svClsID is the class ID of the dll to update with the constructor str.

    Code:
    Set objCatalog = CreateObject("COMAdmin.COMAdminCatalog")
        Set objAppColl = objCatalog.GetCollection("Applications")
        objAppColl.Populate
    '// Update ComCatalog
            For i = 0 To objAppColl.Count - 1
                If objAppColl.Item(i).Key = svAppID Then
                    Set objCmptColl = objAppColl.GetCollection("Components", svAppID)
                    objCmptColl.Populate
                    For j = 0 To objCmptColl.Count - 1
                        If objCmptColl.Item(j).Key = svClsID Then
                            If Not IsNull(svConstruct) Then
                                Set objCmpt = objCmptColl.Item(j)
                                objCmpt.Value("ConstructionEnabled") = True
                                objCmpt.Value("ConstructorString") = svConstruct
                                objCmptColl.SaveChanges
                                
                                objLog.WriteLine "	Updated Class " & svClsID & " in " & svAppID
                                objLog.WriteLine "		Construction Enabled with """ & svConstruct & """"
                            End If
                            Exit For
                        End If
                    Next
                    Exit For
                End If
            Next

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •