LDAP object


Usage:

OBJECT x = CREATE "dynamic", "LDAP", "server"

If an application wishes to use the LDAP object then it should load it once and keep it loaded. Loading it each time it is used is very inefficient.

The writeToString method as implemented in KCML 6.20 has a memory leak. See the notes on the method on how to avoid it.


LDAP
Result
Search result entry
Array
String array element object
Attributes collection
Attribute object
Modification object

LDAP

LDAP object

Allows access to an LDAP server. This initial implementation ignores Unicode issues on Windows. It does not support asynch operation or controls. API is an object wrapper on the Netscape v3 SDK functions.
MethodReturnsPurpose
CreateArray(sArg, ...)ArrayCreate an array object
CreateMod(eOperation, sAttrName, Array)Modification objectCreate a modification object
err2string$(nErr)stringReturn message for given error code
explode_dn(sDN, [bNoType])ArrayExplode a DN into its components
get_option(nOpt, BYREF nVal)intGet an option value
ldap_add_s(sDN$, Array)intAdd a DN with attributes
ldap_delete_s(sDN$)intDrop a DN from the directory
ldap_modify_s(sDN$, Array)intPerform a modification to the attributes of a DN
ldap_rename_s(sDN$, sNewRDN$, sNewParent$, bDeleteOldRDN)intRename a DN synchronously
search_s(sBaseDN, nScope, sFilter, Array, bAttrsOnly, nTimeout, nMaxHits, BYREF nStatus)ResultSearch directory synchronously
set_option(nOpt, nVal)intSet an option
simple_bind([sUser], [sPwd])intIdentify client to LDAP server asynchronously
simple_bind_s([sUser], [sPwd])intIdentify client to LDAP server synchronously

Result

Object holding results of an operation

This collection can be iterated with FOR OBJECT ... NEXT OBJECT

PropertyTypeReturnsPurpose
countRintThe number of entries in the result
firstREntryReturns the first entry from the result list

Search result entry

One matching entry from the search result

MethodReturnsPurpose
Values(sAttrName)ArrayReturns values for a given attribute of this entry
PropertyTypeReturnsPurpose
DN$RstringThe distinguished name for a search result entry
attributesRAttributesReturns collection of attributes for this entry
nextREntryReturns the next entry from the result list

Array

Object holding an array of strings or objects

This collection can be iterated with FOR OBJECT ... NEXT OBJECT

MethodReturnsPurpose
Add(sArg, ...)voidAdd one or more entries to the array
Value(nIndex)ArrayElementReturn a string object from an array (indexed from 1)
PropertyTypeReturnsPurpose
countRintNumber of entries in the array

String array element object

String or binary string object from an array object

PropertyTypeReturnsPurpose
Value$RstringReturn a string value

Attributes collection

A collection of the attributes for an entry

This collection can be iterated with FOR OBJECT ... NEXT OBJECT


Attribute object

An attribute for an entry

PropertyTypeReturnsPurpose
Name$RstringAttribute name
ValuesRArrayAn array of values for the attribute

Modification object

An object describing a modification request

PropertyTypeReturnsPurpose
OpRintModification operation
Type$RstringAttribute name
ValuesRArrayAn array of values for the attribute