On 6/8/03 4:55 pm, markinpa <[EMAIL PROTECTED]> wrote:

> 
> I know how to Access Individual attributes from a Returned Query
> http://www.sbfsbo.com/mike/NetldapTutorial/ I understand this does a ldap
> search,
> 
> In my case, I know the DN of the entry I know the DN of the entry I want to
> return the attributes of, can someone tell me how to do this without
> performing a search?

You *have* to do a search, as that's the only operation LDAP has which
returns entries to you.

However in your case you can just a base object search, with the base set to
the DN you know. Use a filter that is guaranteed to match (since entries
must have object classes, objectClass=* will match).

This is the correct way to "read" a single entry using LDAP:

$res = $ldap->search ( base => $mydn,
                       scope => 'base',
                       filter => '(objectClass=*)' );
my $entry = $res->entry(0);

Add error checking to suit :-)

> I am very thankful for any help.
> 
> Thanks,
> Mark
> 
> 
> 

Cheers,

Chris

Reply via email to