FindEQ (LDAP function): Difference between revisions
m (1 revision) |
m (1 revision) |
||
Line 31: | Line 31: | ||
<tr><th>-4 </th><td>Response message contains ill-formed (unexpected) data</td></tr> | <tr><th>-4 </th><td>Response message contains ill-formed (unexpected) data</td></tr> | ||
<tr><th><i><b>%ld</b></i></th><td>An <var>Ldap</var> object variable.</td></tr> | <tr><th><i><b>%ld</b></i></th><td>An <var>Ldap</var> object variable.</td></tr> | ||
<tr><th><i><b>attrib</b></i></th><td>The name (sometimes called &ldquo;type&rdquo;) of the entry attribute you want to key the directory search. You use the ''searchString'' argument to specify the attribute value, and <var>FindEQ</var> searches the directory for entries that satisfy the ''attrib''=''searchString'' condition. | <tr><th><i><b>attrib</b></i></th><td>The name (sometimes called &amp;ldquo;type&amp;rdquo;) of the entry attribute you want to key the directory search. You use the ''searchString'' argument to specify the attribute value, and <var>FindEQ</var> searches the directory for entries that satisfy the ''attrib''=''searchString'' condition. | ||
Some traditionally supported attribute names include the following, but note that servers are '''not''' required to support them. For more about the standard attribute names, see [[LDAP overview#rfc2256|"RFC 2256"]]. | Some traditionally supported attribute names include the following, but note that servers are '''not''' required to support them. For more about the standard attribute names, see [[LDAP overview#rfc2256|"RFC 2256"]]. | ||
Line 58: | Line 58: | ||
<tr><th><var>AttributesOnly</var></th> | <tr><th><var>AttributesOnly</var></th> | ||
<td>This <var>[[Enumerations#Using Boolean enumerations|Boolean]]</var> enumeration is an optional but [[Notation conventions for methods#Named parameters|name required]] parameter. If set to <code>True</code>, <var>FindEQ</var> still retrieves the entries that satisfy the search condition, | <td>This <var>[[Enumerations#Using Boolean enumerations|Boolean]]</var> enumeration is an optional but [[Notation conventions for methods#Named parameters|name required]] parameter. If set to <code>True</code>, <var>FindEQ</var> still retrieves the entries that satisfy the search condition, | ||
but it returns only the names (also called &ldquo;types&rdquo;) of the available entry attributes, not their associated values. | but it returns only the names (also called &amp;ldquo;types&amp;rdquo;) of the available entry attributes, not their associated values. | ||
If you omit this parameter, its default setting is <code>False</code>. If you specify a value, you must include the parameter name. </td></tr> | If you omit this parameter, its default setting is <code>False</code>. If you specify a value, you must include the parameter name. </td></tr> | ||
Line 72: | Line 72: | ||
<p class="code"> BaseObject='dc=hawaii,dc=edu' | <p class="code"> BaseObject='dc=hawaii,dc=edu' | ||
</p> | </p> | ||
Such a string may be required by your target LDAP server to provide an LDAP base &ldquo;distinguished name,&rdquo; which ensures that the entries your search string locates are unique. | Such a string may be required by your target LDAP server to provide an LDAP base &amp;ldquo;distinguished name,&amp;rdquo; which ensures that the entries your search string locates are unique. | ||
<var>BaseObject</var> is available as of <var class="product">Sirius Mods</var> version 6.8.</td></tr> | <var>BaseObject</var> is available as of <var class="product">Sirius Mods</var> version 6.8.</td></tr> | ||
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 ( | checks of the <var>[[ErrorNumber (LDAP property)|ErrorNumber]]</var> and | ||
<var>[[ErrorText ( | <var>[[ErrorText (LDAP property)|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> |
Revision as of 22:58, 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 |
---|