I think that error can be ignored. I add a additional check on search result to make sure it is not null before throwing an error. c eval myRetCode = ldap_search_st(pi_ldap_id: c piBASEDN: c piScope: c myFilter: c %addr(myAttrPtr): c 0: c %addr(myTimeout): c prSearchRs) c if myRetCode <> LDAP_SUCCESS and c prSearchRs = *null C callp errorOut(%str(ldap_err2string(myRetCode)) c endif -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Cassidy, Alan Sent: Wednesday, July 05, 2006 10:50 AM To: RPG programming on the AS400 / iSeries Cc: Midrange Systems Technical Discussion; c400-L@xxxxxxxxxxxx Subject: LDAP connections to the proper server, and unknown error?? Next I run ldap_search(), because I just want to check the directory for the entry, as opposed to log in. That's where it coughs up an error, and the error code that this LDAP client API is returning to my program is a -1. Great. "Unknown error". That explains everything, huh.