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 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.| Method | Returns | Purpose |
|---|---|---|
| CreateArray(sArg, ...) | Array | Create an array object |
| CreateMod(eOperation, sAttrName, Array) | Modification object | Create a modification object |
| err2string$(nErr) | string | Return message for given error code |
| explode_dn(sDN, [bNoType]) | Array | Explode a DN into its components |
| get_option(nOpt, BYREF nVal) | int | Get an option value |
| ldap_add_s(sDN$, Array) | int | Add a DN with attributes |
| ldap_delete_s(sDN$) | int | Drop a DN from the directory |
| ldap_modify_s(sDN$, Array) | int | Perform a modification to the attributes of a DN |
| ldap_rename_s(sDN$, sNewRDN$, sNewParent$, bDeleteOldRDN) | int | Rename a DN synchronously |
| search_s(sBaseDN, nScope, sFilter, Array, bAttrsOnly, nTimeout, nMaxHits, BYREF nStatus) | Result | Search directory synchronously |
| set_option(nOpt, nVal) | int | Set an option |
| simple_bind([sUser], [sPwd]) | int | Identify client to LDAP server asynchronously |
| simple_bind_s([sUser], [sPwd]) | int | Identify client to LDAP server synchronously |
Object holding results of an operation
This collection can be iterated with FOR OBJECT ... NEXT OBJECT
| Property | Type | Returns | Purpose |
|---|---|---|---|
| count | R | int | The number of entries in the result |
| first | R | Entry | Returns the first entry from the result list |
One matching entry from the search result
| Method | Returns | Purpose |
|---|---|---|
| Values(sAttrName) | Array | Returns values for a given attribute of this entry |
| Property | Type | Returns | Purpose |
|---|---|---|---|
| DN$ | R | string | The distinguished name for a search result entry |
| attributes | R | Attributes | Returns collection of attributes for this entry |
| next | R | Entry | Returns the next entry from the result list |
Object holding an array of strings or objects
This collection can be iterated with FOR OBJECT ... NEXT OBJECT
| Method | Returns | Purpose |
|---|---|---|
| Add(sArg, ...) | void | Add one or more entries to the array |
| Value(nIndex) | ArrayElement | Return a string object from an array (indexed from 1) |
| Property | Type | Returns | Purpose |
|---|---|---|---|
| count | R | int | Number of entries in the array |
String or binary string object from an array object
| Property | Type | Returns | Purpose |
|---|---|---|---|
| Value$ | R | string | Return a string value |
A collection of the attributes for an entry
This collection can be iterated with FOR OBJECT ... NEXT OBJECT
An attribute for an entry
| Property | Type | Returns | Purpose |
|---|---|---|---|
| Name$ | R | string | Attribute name |
| Values | R | Array | An array of values for the attribute |
An object describing a modification request
| Property | Type | Returns | Purpose |
|---|---|---|---|
| Op | R | int | Modification operation |
| Type$ | R | string | Attribute name |
| Values | R | Array | An array of values for the attribute |