[Gambas-user] LDAP search with gambas2

Giovanni Romanenghi giovanni.romanenghi at ...1525...
Mon Jul 24 18:46:14 CEST 2006


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





More information about the User mailing list