Real Software Forums
http://forums.realsoftware.com/

Active directory
http://forums.realsoftware.com/viewtopic.php?f=6&t=42154
Page 1 of 1

Author:  mpmahen [ Mon Jan 09, 2012 10:07 pm ]
Post subject:  Active directory

Has anybody been successful in implementing Active directory functions in Realbasic?
I have tried the ADODB functions, but they do not work correctly. They do not return results.
I really need this.

Maarten

Author:  npalardy [ Mon Jan 09, 2012 10:52 pm ]
Post subject:  Re: Active directory

Active Directory is LDAP and I know there are several people using the LDAP code I created and have on RSLibrary.com

Author:  J.Hansen [ Tue Jan 10, 2012 5:14 am ]
Post subject:  Re: Active directory

npalardy wrote:
Active Directory is LDAP and I know there are several people using the LDAP code I created and have on RSLibrary.com

You can also use openldap command: ldapsearch from a RB shell

If you are using windows see link: http://www.userbooster.de/en/download/o ... ndows.aspx

Linux by deault have it installed most of the times and you should also be able to get for Mac

Openldap source code: http://www.openldap.org/

Author:  npalardy [ Tue Jan 10, 2012 5:12 pm ]
Post subject:  Re: Active directory

The code I have is basically a nice RB set of classes for exactly this :)

Author:  mpmahen [ Tue Jan 10, 2012 9:36 pm ]
Post subject:  Re: Active directory

Thanks for the reactions, will check all of the solutions :)

Author:  mpmahen [ Tue Jan 10, 2012 11:15 pm ]
Post subject:  Re: Active directory

Ok folks, sorted it out with ADO.

The following code will do the trick by filling in a listbox with users:

Dim adodbConnection as new OLEObject("ADODB.Connection")
Dim ConnectionString as String
Dim adoCommand as new OLEObject("ADODB.Command")
Dim x as integer

ConnectionString = "Provider=ADSDSOObject"
adodbConnection.open(connectionstring)

adoCommand.ActiveConnection = adodbConnection
adoCommand.CommandText = "Select SamAccountName from 'LDAP://cn=users,DC=domain,DC=com' where objectCategory ='person' and objectClass='user'"
Dim adoRecordSet as new OLEObject("ADODB.Recordset")
adoRecordSet = adoCommand.Execute
while not adoRecordSet.eof
Listbox1.Addrow
x = ListBox1.LastIndex
ListBox1.Cell(x,0) =adoRecordSet.Fields("SamAccountName").Value

adoRecordSet.MoveNext
wend


Hope this is useful

Author:  willgonz [ Thu Aug 23, 2012 4:10 pm ]
Post subject:  Re: Active directory

Is ADO readonly? If you have access to use DSMOD can you use ADSDSOObject?

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/