WebLdapNextValue Function

Action

Steps through all attributes of an entry returned by a previous call to WebLdapNextEntry.

Include file

WebAPI.bdh

Syntax

WebLdapNextValue( in  hLDAP   : number, 
                  out sName   : string, 
                  in  nMaxLen : number optional, 
                  out nLen    : number optional, 
                  out bBinary : boolean optional): boolean

Return value

  • true if there was at least one value left to receive from the attribute

  • false otherwise

Parameter Description
hLDAP Handle to a Web connection that was created by WebLdapConnect.
sName This variable will receive the content of the next value.
nMaxLen Specifies the maximum length of the value content (optional).
nLen Variable receiving the actual size of the value content (optional).
bBinary Variable receiving an indicator whether the sName variable contains binary data (optional).

Example

dclfunc  
  function TWebLdapPrintSearchResults(hLdap: number) 
  var
    sName : string(500);
    nEntries : number; 
  begin
    nEntries := 0;

    while WebLdapNextEntry(hLdap, sName, STRING_COMPLETE, false) do
      nEntries := nEntries + 1; 
      write("entry: "); write(sName); writeln;

      while WebLdapNextAttribute(hLdap, sName) do 
        write(" attrib: "); write(sName); writeln;

        while WebLdapNextValue(hLdap, sName) do 
          write(" value: "); write(sName); writeln; 
        end; 
      end; 
    end; 

    if(nEntries = 0) then 
      write("No entries found"); 
      writeln; 
    end; 
    
    writeln; 
  end TWebLdapPrintSearchResults;

SilkEssential sample

LDAP.sep