Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Wed Dec 11, 2019 2:50 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Active directory
PostPosted: Mon Jan 09, 2012 10:07 pm 
Offline

Joined: Mon Jan 09, 2012 10:04 pm
Posts: 5
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


Top
 Profile  
Reply with quote  
 Post subject: Re: Active directory
PostPosted: Mon Jan 09, 2012 10:52 pm 
Offline
Real Software Engineer

Joined: Sat Dec 24, 2005 8:18 pm
Posts: 7858
Location: Canada, Alberta, Near Red Deer
Active Directory is LDAP and I know there are several people using the LDAP code I created and have on RSLibrary.com

_________________
Norman Palardy (Real Software)


Top
 Profile  
Reply with quote  
 Post subject: Re: Active directory
PostPosted: Tue Jan 10, 2012 5:14 am 
Offline

Joined: Wed Dec 14, 2011 4:20 am
Posts: 84
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/


Top
 Profile  
Reply with quote  
 Post subject: Re: Active directory
PostPosted: Tue Jan 10, 2012 5:12 pm 
Offline
Real Software Engineer

Joined: Sat Dec 24, 2005 8:18 pm
Posts: 7858
Location: Canada, Alberta, Near Red Deer
The code I have is basically a nice RB set of classes for exactly this :)

_________________
Norman Palardy (Real Software)


Top
 Profile  
Reply with quote  
 Post subject: Re: Active directory
PostPosted: Tue Jan 10, 2012 9:36 pm 
Offline

Joined: Mon Jan 09, 2012 10:04 pm
Posts: 5
Thanks for the reactions, will check all of the solutions :)


Top
 Profile  
Reply with quote  
 Post subject: Re: Active directory
PostPosted: Tue Jan 10, 2012 11:15 pm 
Offline

Joined: Mon Jan 09, 2012 10:04 pm
Posts: 5
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


Top
 Profile  
Reply with quote  
 Post subject: Re: Active directory
PostPosted: Thu Aug 23, 2012 4:10 pm 
Offline

Joined: Thu May 13, 2010 7:27 pm
Posts: 341
Is ADO readonly? If you have access to use DSMOD can you use ADSDSOObject?


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group