4 Replies Latest reply: Jul 30, 2012 9:40 AM by 951187 RSS

    Can I query OVD using  Visual BasicTool

    951187
      Hi,
      I have a visual basic tool which needs to authenticate against OVD.
      I have not been able to figure out as to how to connect to OVD using visual basic.


      Arijit

      Edited by: user1152208 on Jul 27, 2012 12:50 PM
        • 1. Re: Can I query OVD using  Visual BasicTool
          user9107956
          Hi,

          OVD looks like an LDAP server from the "outside", so if your VB tool can do LDAP, that should work. The default non-SSL port is probably 6501.

          Jim
          • 2. Re: Can I query OVD using  Visual BasicTool
            951187
            Hi Jim,
            Thanks for the reply. When i use the tool to query LDAP it works, but when i change the server parameter to point to OVD it throws error.
            Any idea as to what the query should be to get say an users givenName

            My Visual Basic code is as below

            Set conn = CreateObject("ADODB.Connection")
            conn.Provider = "ADsDSOObject"
            conn.Properties("User ID") = uid
            conn.Properties("Password") = pwd
            conn.ConnectionTimeout = timeout
            conn.Open

            Set cmd = CreateObject("ADODB.Command")
            cmd.CommandText = “LDAP://servername/DC=company,DC=com>;(&(objectClass=*)(sAMAccountName=user1));givenName;subtree"”
            cmd.ActiveConnection = conn

            Set rs = cmd.Execute


            Arijit
            • 3. Re: Can I query OVD using  Visual BasicTool
              Kevin Pinsky
              I don't see a port listed in post. OVD uses 6501 by default non-ssl.

              -Kevin
              • 4. Re: Can I query OVD using  Visual BasicTool
                951187
                Hi Kevin,
                I tried it with the Port 6501 but am not connecting.
                I can connect using a third party tool LDAP Browser,
                But my tool would not.


                Set conn = CreateObject("ADODB.Connection")
                conn.Provider = "ADsDSOObject"
                conn.Properties("User ID") = uid
                conn.Properties("Password") = pwd
                conn.ConnectionTimeout = timeout
                conn.Open

                Set cmd = CreateObject("ADODB.Command")
                cmd.CommandText = “LDAP://servername:6501/DC=company,DC=com>;(&(objectClass=*)(sAMAccountName=user1));givenName;subtree"”
                cmd.ActiveConnection = conn