× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



There are some free LDAP clients on the web that you can install to try
out.  I did that the last time to finally find out the problem with
operation error problem.

The other problem that I can think of was that Base_DN is wrong.

Below is my code on getting the ldap connect id (also using Scott's
example to create it.  Not sure why I added the call to set the LDAP
protocol version): 

     C*===============================================================
      * setup LDAP connection
     P get_ldap_id     B
     D                 pi              *

     D pr_ldap_id      S               *

     D my_ldapServer   C                   const('ldapServer')
     D my_DNuser       C
const('cn=_myUserID,ou=resources-
     D
,ou=corporate,dc=us,dc=myDomain,dc=com')
     D my_DNuserPswd   C                   const('mypassword')

     D myRetCode       S             10I 0
     D my_ldap_ver     S             10I 0 inz(3)
     D myIx            S              5I 0
     D

     c                   eval      pr_ldap_id = ldap_init(my_ldapServer
     c                                :LDAP_PORT)
     c                   if        pr_ldap_id = *NULL
     c                   eval      myRetCode =
ldap_get_errno(pr_ldap_id)
     C                   callp
errorOut(%str(ldap_err2string(myRetCode)))
     c                   endif

     c                   eval      myRetCode =
ldap_set_option(pr_ldap_id
     c                                :LDAP_OPT_PROTOCOL_VERSION
     c                                :%addr(my_ldap_ver))
     c                   if        myRetCode <> LDAP_SUCCESS
     C                   callp
errorOut(%str(ldap_err2string(myRetCode)))
     c                   endif


     c                   eval      myRetCode =
ldap_simple_bind_s(pr_ldap_id
     c                                :my_DNuser :my_DNuserPswd)
     c                   if        myRetCode <> LDAP_SUCCESS
     C                   callp
errorOut(%str(ldap_err2string(myRetCode)))
     c                   endif

      *     save the ldap_id for clean up purpose
      *     ------------------------------------------------------
     c                   if        pr_ldap_id <> *null
     c
     c                   for       myIx = 1 to %elem(sv_ldap_id)
     c                   if        sv_ldap_id(myIx) = *null
     c                   eval      sv_ldap_id(myIx) = pr_ldap_id
     c                   leave
     c                   endif
     c                   endfor
     c
     c                   endif
     c
     c                   return    pr_ldap_id

     P get_ldap_id     E


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of PITTOORS Luc
Sent: Thursday, November 10, 2005 3:03 AM
To: 'rpg400-l@xxxxxxxxxxxx'
Subject: RE: LDAP search - operations error 

Andrew,
 
my LDAP server also is an Active Directory Windows machine I tried the
tree notation for the login account, as well as the full notation as Lim
mentioned .
Both give the same problem.
 


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.