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

ldap.attribute

 
 

Library: LDAP support (OMLDAP)
Import: omldap.xmd


Purpose

The ldap.attribute opaque data type allows you to perform actions on the entry or attribute instance by using the OmniMark LDAP (OMLDAP) library functions.

Within your program, you can create as many instances of the ldap.attribute data type as you require by declaring global and local variables of type "ldap.attribute".

An LDAP attribute may contain either binary or text values. All functions that manipulate an LDAP attribute allow you to specify whether the attribute value is binary or text. Text values are the default. If it is binary, you must specify ldap.binary-type as the type.

Once you have declared your ldap.attribute variables, you can display, add, delete, or change them with the functions in the OmniMark LDAP library. This example outputs the value of the "phonenumber" attribute in the first entry satisfying the search request.

Example


  import "omldap.xmd" prefixed by ldap.
  
  process
     local ldap.connection my-ldap
     local ldap.attribute  my-entry variable
  
     set my-ldap to ldap.open 'www.stilo.com'
     ldap.search my-ldap
        base  "o=stilo.com"
        where  "(Department=RD)"
        into   my-entry
        select "phonenumber"
  
     do when ldap.entry-exists my-entry
        output ldap.entry-name of my-entry || ": "
            || ldap.reader of my-entry{"phonenumber"}
            || "%n"
     done

      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.