473,320 Members | 1,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

LDAP Searching

I am looking for some assistance with searching a third part LDAP database.
I have managed to read from it and write to it using
Dim objAD As ActiveDs.IADs

Dim objDS As ActiveDs.IADsOpenDSObject

Dim objContainer As ActiveDs.IADsContainer

Dim strUser As String

Dim strPassword As String

Dim strServerIPAddress As String

Dim strServerPort As String

Dim strLDAPConnection As String

strUser = "UserName"

strPassword = "password"

strServerIPAddress = "xxx.xxx.xxx.xxx"

strServerPort = "4000"

strLDAPConnection = "LDAP://" & strServerIPAddress & ":" & strServerPort &
"/"

'Connect to database

objDS = GetObject("LDAP:")

objContainer = objDS.OpenDSObject(strLDAPConnection & "CN=Users", strUser,
strPassword, 32)

'Get Object we're interested in

objAD = objContainer.GetObject("User", "CN=Bev")

'Update Property

objAD.Put("extRef", "test")

'Read Property

MsgBox(objAD.Get("description"))

But I cant seem to find a way to search the database.

Any help would be much apreciated.

Bev
Nov 21 '05 #1
1 2873
On Thu, 28 Jul 2005 14:45:33 +0100, "Jon Beverley" <be******@hotmail.com> wrote:

¤ I am looking for some assistance with searching a third part LDAP database.
¤ I have managed to read from it and write to it using
¤ Dim objAD As ActiveDs.IADs
¤
¤ Dim objDS As ActiveDs.IADsOpenDSObject
¤
¤ Dim objContainer As ActiveDs.IADsContainer
¤
¤ Dim strUser As String
¤
¤ Dim strPassword As String
¤
¤ Dim strServerIPAddress As String
¤
¤ Dim strServerPort As String
¤
¤ Dim strLDAPConnection As String
¤
¤ strUser = "UserName"
¤
¤ strPassword = "password"
¤
¤ strServerIPAddress = "xxx.xxx.xxx.xxx"
¤
¤ strServerPort = "4000"
¤
¤ strLDAPConnection = "LDAP://" & strServerIPAddress & ":" & strServerPort &
¤ "/"
¤
¤ 'Connect to database
¤
¤ objDS = GetObject("LDAP:")
¤
¤ objContainer = objDS.OpenDSObject(strLDAPConnection & "CN=Users", strUser,
¤ strPassword, 32)
¤
¤ 'Get Object we're interested in
¤
¤ objAD = objContainer.GetObject("User", "CN=Bev")
¤
¤ 'Update Property
¤
¤ objAD.Put("extRef", "test")
¤
¤ 'Read Property
¤
¤ MsgBox(objAD.Get("description"))
¤
¤
¤

Use the System.DirectoryServices namespace instead of ADSI.

http://msdn.microsoft.com/library/de...yhierarchy.asp
Paul
~~~~
Microsoft MVP (Visual Basic)
Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: dmcconkey | last post by:
Hi folks, I've been searching for a while and haven't found my specific question anywhere else. If this has already been asked, please accept my appologies and point me to the appropriate...
0
by: Bjoern Eberth | last post by:
Hi there, i have a few problems accessing a ldap server with the java api JNDI. I am able to get attributes with the following code: ...
2
by: Chandy | last post by:
Hi, I have found some sample code for accessing active directory using the LDAP provider to check a user's credentials. The sample looks good but I do not understand the point of two lines. ...
5
by: Bryan | last post by:
Hello, I have a asp.net app working with directory services on my Windows XP development machine. However when I moved the application over to our production server (Win 2000 Server) it no longer...
2
by: Rosanne Rohana | last post by:
I'm trying for return user info (first name, last name, etc.) from a Netscape 4.16 LDAP server using the System.DirectoryServices. I'm able to get authenticated successfully, but when I attempt to...
2
by: Chris Kormann | last post by:
I am attempting to use LDAP to retrieve a list of users from within a web service. When the FindAll() method is invoked, I receive the following exception: "The specified domain either does not...
3
by: mr.enx | last post by:
sorry, i'm new with Python. I must do interaction beetween Python and Ldap, and I don't know how do this. Searching on the web I know that exists PythonLdap, but I dont'know if this is best...
6
by: hotani | last post by:
I am attempting to pull info from an LDAP server (Active Directory), but cannot specify an OU. In other words, I need to search users in all OU's, not a specific one. Here is what works: con...
0
by: Sells, Fred | last post by:
I'm running python 2.5 (or 2.4) in an XP environment. I downloaded and installed the .dll's from OpenLDAP-2.4.8+OpenSSL-0.9.8g-Win32.zip and copied the .dll's in c:/windows/system32 as instructed...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.