FindEQ (LDAP function): Difference between revisions
m (1 revision) |
m (→Usage notes) |
||
Line 134: | Line 134: | ||
Since even a <var class="term">%st</var> value of zero does not guarantee that | Since even a <var class="term">%st</var> value of zero does not guarantee that | ||
the <var>XmlDoc</var> contents are complete, you need to include | the <var>XmlDoc</var> contents are complete, you need to include | ||
checks of the <var>[[ErrorNumber (LDAP | checks of the <var>[[ErrorNumber (LDAP function)|ErrorNumber]]</var> and | ||
<var>[[ErrorText (LDAP | <var>[[ErrorText (LDAP function)|ErrorText]]</var> | ||
properties in your programs when incomplete query results are not tolerable. | properties in your programs when incomplete query results are not tolerable. | ||
</ul> | </ul> | ||
==Example== | ==Example== | ||
Revision as of 23:02, 8 July 2011
Retrieve matching records from the LDAP directory (LDAP class)
This callable function
retrieves all records (entries) from the LDAP directory
that satisfy the criterion
attributeType=searchString
(for example, cn=Albert Einstein
), where:
- attributeType is one of the entry attribute types defined in the target LDAP server.
- searchString is a string, which may include blanks and special characters.
- The attribute type and search string are separate FindEQ arguments you must explicitly specify.
Syntax
[%number =] ldap:FindEQ( attrib, searchString, doc, - [AttributesOnly= boolean], - [ReturnAttributes= stringlist], [BaseObject= string])
Syntax terms
%st | A float variable to contain the operational status result of the method. A zero indicates that the method operation succeeded; a negative value indicates an error, which may or may not be in the client code. More specific information about the
If the client is the source of the error, or no server error information is available, ErrorNumber may be the same as %st, or it may be set harmlessly to 0, and ErrorText is likely to contain explanatory information for the If the server reports an error, the ErrorNumber property is set to that number, which is likely to differ from %st, and the ErrorText value will contain whatever information about the server error is available. Possible %st values are:
Usage notesIn addition to the following notes, see "Using the Find methods".
ExampleAgainst a test LDAP server,
the following FindEQ statement does a search of %st = %ld:FindEQ('cn', 'sildar john', %doc, - AttributesOnly=TRUE) The <result> <entry objectName="cn: Sildar, John R, id=X479, o=Boston University, c=US"> <cn/> <sn/> <givenname/> <postaladdress/> <title/> <o/> <telephonenumber/> <objectclass/> <l/> <st/> <c/> </entry> </result> See also |
---|