swirl
Guide to OmniMark 9   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
    Other Library Functions  
function  

ldapSearch

 
 

Library: LDAP support (OMLDAP legacy)
Include: omldap.xin

Declaration

define external function ldapSearch
             value      ldapConnection connection
     base    value      stream         base
     scope   value      integer        scope      optional  initial { LDAP_SCOPE_ONELEVEL }
     where   value      stream         filter
     entry   modifiable ldapAttribute  entry
     format  value      integer        format     optional  initial { LDAP_FORMAT_VALUE }
     selects read-only  stream         attributes optional
     select  remainder  stream         attribute

Where:

Argument definitions

connection
A connection to an LDAP server.
base
The root value for the start of the search.
scope
A parameter that specifies how deep in the tree you want to search. The default is LDAP_SCOPE_ONELEVEL. The other possible parameters are LDAP_SCOPE_BASE and LDAP_SCOPE_SUBTREE.
filter
The search filter for this scope.
entry
A shelf of ldapAttribute items bound to the result.
format
The format of the search result. LDAP_FORMAT_VALUE is the default; the other value is LDAP_FORMAT_VALUE_TYPE.
attributes
A shelf of attribute names whose values you want returned.
attribute
An attribute name whose value you want returned. Since this parameter is a remainder, more than one attribute name may be listed.


Purpose

The ldapSearch function executes a search on the LDAP server specified by ldapConnection.

The following example searches one level deep from the base of "omnimark.com" in the RD department for the name, employee number, and phone number of whatever entry my-entry has been set to.

      include "omldap.xin"
  
      process
         local ldapAttribute my-entry variable
         ...
         ldapSearch my-ldap
            base "o=omnimark.com"
            scope LDAP_SCOPE_ONELEVEL
            where"(Department=RD)"
            entry my-entry
         	  select "name"
         	  select "employeenumber"
         	  select "phonenumber"

These lines are part of a larger program that repeats over my-entry so that the information for all the employees in department RD is found and output.

      Other Library Functions
 
 

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ LEGACY LIBRARIES ] [ ERRORS ]

OmniMark 9.1.0 Documentation Generated: September 2, 2010 at 1:38:10 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2010.