Table of Contents | Previous | Next | Index

Netscape Directory SDK 3.0 for C Programmer’s Guide
     Chapter 18 Functions

ldap_err2string()

The ldap_err2string() function returns the corresponding error message for an error code. For more information, see "Getting the Error Message" on page 78.

Syntax

#include <ldap.h>
char * ldap_err2string( int err );

Parameters

This function has the following parameters:

err

Error code that you want interpreted into an error message

Returns

One of the following values:

Example

The following section of code sets the variable err_msg to the error message corresponding to the error code returned by the ldap_simple_bind_s() function.

#include <ldap.h>
...
LDAP *ld;
char *dn = "uid=bjensen, ou=People, o=Airius.com";
char *pw = "hifalutin";
char *err_msg;
...
err_msg = ldap_err2string( ldap_simple_bind_s( ld, dn, pw ) );
...

See Also

ldap_get_lderrno(), ldap_perror(), ldap_result2error(), ldap_set_lderrno().


Table of Contents | Previous | Next | Index

Last Updated: 10/01/98 17:06:23