thread184-1143741
I am trying to get information from Active server and found this code in the thread shown above:
strDomain = "ontario.cnty" && Your own domain name
Clear
On Error
Public PrimDomainContr
Create Cursor names (username c(30),fullname c(80),description c(80),Class c(50),accdisable l,;
acclocked l,profile c(30),loginscript c(50),Homedir c(30))
PrimDomainContr = Getobject("WinNT://" + strDomain)
For Each User In PrimDomainContr
If User.Class = 'User'
Insert Into names (username,fullname,description,Class,accdisable,acclocked,profile,;
loginscript,Homedir) Values (User.Name,user.fullname,User.description,User.Class,User.AccountDisabled,;
User.IsAccountLocked,User.Profile,User.loginscript,User.Homedirectory)
Endif
Next
Browse Norm
It works great. The problem is I need other information like email, department, job title but can not for the life of me figure out what the field names should be. For example when I add User.MailAddress I get an invalid name message. Does anyone know or can anyone tell me where to get those field name values to pull in the other information that I want?
I am trying to get information from Active server and found this code in the thread shown above:
strDomain = "ontario.cnty" && Your own domain name
Clear
On Error
Public PrimDomainContr
Create Cursor names (username c(30),fullname c(80),description c(80),Class c(50),accdisable l,;
acclocked l,profile c(30),loginscript c(50),Homedir c(30))
PrimDomainContr = Getobject("WinNT://" + strDomain)
For Each User In PrimDomainContr
If User.Class = 'User'
Insert Into names (username,fullname,description,Class,accdisable,acclocked,profile,;
loginscript,Homedir) Values (User.Name,user.fullname,User.description,User.Class,User.AccountDisabled,;
User.IsAccountLocked,User.Profile,User.loginscript,User.Homedirectory)
Endif
Next
Browse Norm
It works great. The problem is I need other information like email, department, job title but can not for the life of me figure out what the field names should be. For example when I add User.MailAddress I get an invalid name message. Does anyone know or can anyone tell me where to get those field name values to pull in the other information that I want?