Does anybody know how to retrieve information from AD into a report?
In SQL2005 we work with groups in stead of usernames and I need to retrieve employee.no.
I tried with an ODBC connection but I can not get it to work.
CREATE(ADOcnn);
CnnStr := 'PROVIDER=ADsDSOObject';
ADOcnn.Open(CnnStr);
CREATE(ADOrst)
strSQL := 'SELECT ADsPath FROM 'LDAP://dc=domain,dc=nl'';
ADOrst.Open(strSQL,ADOcnn)
Thanks in advance.
0
Comments
2) Take a look at virtual tables 2000000050..2000000056. I think that it is what you need.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
I just want to be able to talk to the active directory in stead.
Do you know how?
Hilde
2) Take a look at virtual tables 2000000050..2000000056. I think that it is what you need.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
In the 2000050 you have all the ad users/groups etc...
Can anyone point me in the direction on how to proceed from there to pe. change the phone number in the AD for a particular user..
Object is to update from employee card certain data in the ad, so we don't have to put them in twice....
Rgds
Benny
Benny Giebens
1) he user will need to have permissions on AD to do that
2) You can use some automation to do that, but not through Virtual tables.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
2) i know i need to use automation, the problems is what controls, and how to use them......so if someone has some code expamples it would be very helpfull!!
Benny Giebens
i didn't search which automation can be used in Nav but i think you can use this solution simply:
1. here is my vb code that i used 4 years ago to update objects in ad.
2. change above code lines because it should take parameters from command line.(i am supposing that you are familiar with vbscript)
3. save the above code into a .vbs file.
4. call cscript.exe or wscript.exe to run that vbs file from Navision with parameters..(you can use "windows scrpting host object".wshshell).
google will give you lots of examples of vb scripts to do that.
also you can save the vb codes as txt files, not vbs files. cscript.exe or wscript.exe will run them properly..
hope this help..