[Gambas-user] LDAP search with gambas2
Benoit Minisini
gambas at ...1...
Tue Jul 25 23:29:38 CEST 2006
On Monday 24 July 2006 18:46, Giovanni Romanenghi wrote:
> I'm newbye for gambas. I use gambas2 ver. 1.9.34.
>
> I want read an ldap entry. Init , Bind and search work properly. My
> problem is this:
> When I want print my ldap entry if I have attribute multi value don't
> print all value but only 1 value.
> This is my code:
>
> PUBLIC SUB btnOK_Click()
>
> DIM ldaphost AS String = "localhost"
> DIM ldapport AS Integer = "389"
> DIM ldaprootdn AS String = "cn=Directory Manager"
> DIM ldaprootpwd AS String = "password"
> DIM variabile AS NEW Ldap
> DIM pippo AS Object[]
> DIM var1 AS Boolean
> DIM var2 AS Integer
> DIM element AS String
> DIM dict AS NEW Collection
> DIM count AS Integer
>
> TBldaphost.Text = ldaphost
> TBldapport.Text = ldapport
> var1 = variabile.Init(ldaphost, ldapport)
> var2 = variabile.Bind(ldaprootdn, ldaprootpwd)
> pippo = variabile.Search("dc=sorint,dc=it", 2, "uid=giovanni")
>
> '''****************************************'
> ''''' My problem is in this line ''''
> FOR EACH element IN pippo[0].getentries()
> PRINT element;
> NEXT
>
> END
>
> Excuseme for my english.
>
> TIA
> Bye Giovanni
>
>
Alas I can hardly help you, as I know almost nothing about LDAP.
Carlo Sorda has made the LDAP component, and so could tell you about your
problem. Maybe he is on holidays?
Regards,
--
Benoit Minisini
More information about the User
mailing list