cancel
Showing results for 
Search instead for 
Did you mean: 

Details of Write/Read Options and Value - Calling LDAP Protocol Functions

Selle1
Explorer
0 Kudos
130

Based on Calling LDAP Protocol Functions - SAP Documentation, these are the following Write/Read Options with Option Number fields:

  • 2: LDAP_OPT_DEREF

  • 3: LDAP_OPT_SIZELIMIT

  • 4: LDAP_OPT_TIMELIMIT

  • 8: LDAP_OPT_REFERRALS

  • 9: LDAP_OPT_RESTART

  • 17: LDAP_OPT_PROTOCOL_VERSION

  • 49: LDAP_OPT_ERROR_NUMBER

I would like to seek more details to the meaning of each option above and its recommended option value.

I don't have the product documentation stated to the link and not found in F1 help either.

View Entire Topic
umasaral
Active Participant
0 Kudos

Hi 

Please find the details for `LDAP_OPT_RESTART` and `LDAP_OPT_ERROR_NUMBER`:

LDAP_OPT_RESTART (Option Number: 9)
Meaning: This option controls whether the LDAP client should automatically retry an operation after a transient failure, such as a network timeout.
Functionality:
If enabled, the client attempts to reconnect and retry the operation if it encounters specific errors (like network interruptions).
This is useful for improving application resilience in environments with unstable connections.
Recommended Values:
`0`: Disable auto-restart (default behavior).
`1`: Enable auto-restart.

LDAP_OPT_ERROR_NUMBER (Option Number: 49)
Meaning: This option allows the client to retrieve the last error code that occurred during an LDAP operation.
Functionality:
After performing an LDAP operation (e.g., search, bind), you can check this option to get the integer error code representing the type of error encountered.
This is particularly useful for debugging and handling specific error scenarios in your application logic.
Usage: Typically, you call the function to retrieve the error number after an operation fails, and it does not have a setting value since it is read-only.