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

ldapSearch

 
 

Library: LDAP support (OMLDAP) legacy library
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
   ldap_IsVersionCompatible
   ldap_LibraryVersion
   ldapAddEntry
   ldapAttribute
   ldapAttributeGetValue
   ldapAttributeGetValues
   ldapClose
   ldapConnection
   ldapCreateAttribute
   ldapDeleteEntry
   ldapEntryAdvance
   ldapEntryExists
   ldapEntryGetName
   ldapModifyEntry
   ldapOpen
   ldapRenameEntry
   ldapSearch
 
 

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

OmniMark 7.1.2 Documentation Generated: June 28, 2005 at 5:45:27 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © Stilo Corporation, 1988-2005.