473,396 Members | 2,113 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,396 software developers and data experts.

Accessing LDAP through VB

hello..
I am new to VB and really new to LDAP

I am trying to write an application for our lunch card system...where a
student's card is read by a barcode reader and the information (a
string) is sent to the LDAP and some attribute value is accessed.

here's the BaseDN:- ou=test1,dc=ky,dc=local
LDAP server:- ldapone.ky.local

I have the userDN and Password!...
I would like to know the syntax for bindin and R/W to a specific
attribute!...... i tried to make the connection using the following but
it's not working!..

Dim con
Dim command
Dim rs
Dim dso
Dim cont
Dim path
Dim user

AdsPath = "LDAP://ldapone.ky.local/ou=Students,ou=test1,dc=ky,dc=local"
Set con = CreateObject("ADODB.Connection")
con.Provider = "ADsDSOObject"
con.Properties("User ID") =
"uid=test2admin,ou=adminuser,dc=ky,dc=local"
con.Properties("Password") = "password"
con.Properties("ADSI Flag") = "34"

con.Open "ADSI"

Set com = CreateObject("ADODB.Command")
Set com.ActiveConnection = con


com.CommandText = "<" & LDAP:
/ldapone.ky.local/ou=Students,ou=test1,dc=ky,dc=local & ">;(uid="&
kt40627 & " );Adspath,cn,SavoniaStudentCard,SavoniaLastLunch;s
ubtree"

Set rs = com.Execute
may i get some help working things out here?
thank you very much!

Jul 18 '06 #1
1 2414
Are you writing this application in VBScript or VB.Net and/or which version?

Pixaar wrote:
hello..
I am new to VB and really new to LDAP

I am trying to write an application for our lunch card system...where a
student's card is read by a barcode reader and the information (a
string) is sent to the LDAP and some attribute value is accessed.

here's the BaseDN:- ou=test1,dc=ky,dc=local
LDAP server:- ldapone.ky.local

I have the userDN and Password!...
I would like to know the syntax for bindin and R/W to a specific
attribute!...... i tried to make the connection using the following but
it's not working!..

Dim con
Dim command
Dim rs
Dim dso
Dim cont
Dim path
Dim user

AdsPath = "LDAP://ldapone.ky.local/ou=Students,ou=test1,dc=ky,dc=local"
Set con = CreateObject("ADODB.Connection")
con.Provider = "ADsDSOObject"
con.Properties("User ID") =
"uid=test2admin,ou=adminuser,dc=ky,dc=local"
con.Properties("Password") = "password"
con.Properties("ADSI Flag") = "34"

con.Open "ADSI"

Set com = CreateObject("ADODB.Command")
Set com.ActiveConnection = con


com.CommandText = "<" & LDAP:
/ldapone.ky.local/ou=Students,ou=test1,dc=ky,dc=local & ">;(uid="&
kt40627 & " );Adspath,cn,SavoniaStudentCard,SavoniaLastLunch;s
ubtree"

Set rs = com.Execute
may i get some help working things out here?
thank you very much!
Jul 20 '06 #2

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

Similar topics

1
by: mel finney | last post by:
Hi I am trying to access a LDAP server with ASP with no sucess. I can do it with ColdFusion but not ASP. All the examples I have seen so far do not use passwords or userid's. My LDAP server...
1
by: MarkAurit | last post by:
The below works when the first parameter to DirectoryEntry is set to our corporate AD domain, such as LDAP://FORD. But if I try for a group within the domain, such as LDAP://FORD/TRUCKS, I get the...
1
by: Jody Gelowitz | last post by:
This one should be relatively simple, though I have yet to figure it out. I have an ASP.NET project which uses LDAP authentication to login to the system. When run on our Development or Staging...
2
by: Serline | last post by:
I can login to the domain hosted by Win 2003. However when my .NET application trys to authenticate using NTLM with LDAP on Win 2003, I'm encountering problems. It's showing "The authentication...
3
by: Steve Lloyd | last post by:
Hi, I am trying to get someones email address out of the win 2003 server Directory using there logon name and the following code. Dim DSEntry As New...
1
by: Rohit Ambani | last post by:
I have created Login.aspx Page On Click of Login Button.I invoke the code as follows ====================================================== Dim adPath As String = "LDAP://172.21.1.19" 'Path to your...
2
by: sweetpotatop | last post by:
Hi, I have an asp.net applicaiton in which I want to control the accessibility. Does anyone has any idea how I can access the Lotus Notes address book through LDAP? That way, I can restrict...
3
by: TomikZ | last post by:
I'd like to get some user account properties using .asp script. When I try to use ADSI WINNT provider it works fine except that I apparently cannot access some properties such as...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.