Accessing LDAP through VB

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Pixaar

    #1

    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.loca l

    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.loca l/ou=Students,ou= test1,dc=ky,dc= local"
    Set con = CreateObject("A DODB.Connection ")
    con.Provider = "ADsDSOObje ct"
    con.Properties( "User ID") =
    "uid=test2admin ,ou=adminuser,d c=ky,dc=local"
    con.Properties( "Password") = "password"
    con.Properties( "ADSI Flag") = "34"

    con.Open "ADSI"

    Set com = CreateObject("A DODB.Command")
    Set com.ActiveConne ction = con




    com.CommandText = "<" & LDAP:
    /ldapone.ky.loca l/ou=Students,ou= test1,dc=ky,dc= local & ">;(uid="&
    kt40627 & " );Adspath,cn,Sa voniaStudentCar d,SavoniaLastLu nch;s
    ubtree"



    Set rs = com.Execute


    may i get some help working things out here?
    thank you very much!

  • Travis Sharpe

    #2
    Re: Accessing LDAP through VB

    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.loca l
    >
    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.loca l/ou=Students,ou= test1,dc=ky,dc= local"
    Set con = CreateObject("A DODB.Connection ")
    con.Provider = "ADsDSOObje ct"
    con.Properties( "User ID") =
    "uid=test2admin ,ou=adminuser,d c=ky,dc=local"
    con.Properties( "Password") = "password"
    con.Properties( "ADSI Flag") = "34"
    >
    con.Open "ADSI"
    >
    Set com = CreateObject("A DODB.Command")
    Set com.ActiveConne ction = con
    >
    >
    >
    >
    com.CommandText = "<" & LDAP:
    /ldapone.ky.loca l/ou=Students,ou= test1,dc=ky,dc= local & ">;(uid="&
    kt40627 & " );Adspath,cn,Sa voniaStudentCar d,SavoniaLastLu nch;s
    ubtree"
    >
    >
    >
    Set rs = com.Execute
    >
    >
    may i get some help working things out here?
    thank you very much!
    >

    Comment

    Working...