SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast spambler's Avatar
    Join Date
    Mar 2003
    Location
    England
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    LDAP field name problem

    I have a page which grabs data from Active Users which was working great last week. All of a sudden my code doesn't like some of the field names. For the purpose of keeping this short let's just say it's one field 'Department'

    Code:
     Dim department 
    MyFullName = "FRED BLOGGS"
    SQLStmt = "SELECT name,physicaldeliveryofficename,department " & _
    		  "FROM 'LDAP://lvp-ad.myserver.wan' " & _
    		  "WHERE objectClass = 'user' AND name='" & MyFullName &"'"
    Set Conn = CreateObject("ADODB.Connection")
    Conn.Provider = "ADSDSOObject"
    Conn.Open "ADs Provider"
    Set rs = Conn.Execute(SQLStmt)
    So, if i remove department all works fine. Any help appreciated.

  2. #2
    SitePoint Enthusiast
    Join Date
    Feb 2005
    Posts
    53
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Did somethin change in your AD structure? field names/os..anything? Try to set that up to try, and catch and exception to see what the exception is. I experienced something like that in vb.net...in fact, it was the identical problem. When I eliminated certain fields, it worked. Turns out it was because AD did not have the same custom fields on some of our ad servers..

    come to think of it, is this occuring on custom or standard fields?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •