sample of SearchDirectory function

I am trying to run the SearchDirectory function but it keeps returning an error.

The documentation says the following

 

Description

Retrieve information from an LDAP directory search.

Property Name

Description

Return Type

Attributes

Specify any attributes on which to search.

DataContainer

Connection

Provide a valid connection to the required data source.

DataContainer

Depth

Specify the depth of the search.

DataContainer

Filter

Specify any filters to apply to the search.

DataContainer

Parameters

Specify any parameters on which to search.

DataContainer

Search Base

Specify the base node from which to search.

DataContainer

 

 


 

So I am trying the following:

SearchDirectory(new directoryservice(),"LDAP://99..9.999:999/OU=Comp Users,DC=comp,DC=com","displayname=User Full Name","employeenumber","Base")

 

And I am using it on a field assignment,but it returns this

 

DB_E_ERRORSINCOMMAND(0x80040E14).

 

Does anyone have a working sample of this?

 

Am I putting the filter wrongly?

I am reading it that the parameter is the value I want to return, though the description seems vague on this one.

 

 

Tagged: