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!

Add user to COM+ role 1

Status
Not open for further replies.

andsm

Programmer
Nov 26, 2000
3
RU
How to add user to COM+ role using Com+ objects?
I can add role to COM+ application, but when I try do same to add new user to role, it say error. Why it is so? Here is the the code:

Sub AddNewUserToRole(Role As COMAdmin.COMAdminCatalogObject, sUser As String, clRoles As COMAdminCatalogCollection)
Dim a As COMAdmin.COMAdminCatalog
Dim b As COMAdminCatalogCollection
Dim c As COMAdminCatalogObject
Dim d
Dim s As String
Dim i As Long
Set b = clRoles.GetCollection("UsersInRole", GetKey(clRoles, "NextTestRole2")) 'it works good
b.Populate
Set c = b.Add
c.Value("Name") = "IT-22\Guest" 'here is error
b.SaveChanges
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top