ADSI, ADsDSOObject, Error '80040e37' Table does not exist???

Discussion in 'ASP General' started by Ollie, Apr 28, 2004.

  1. Ollie

    Ollie Guest

    Ok, I'm new to ADSI and am trying use the following code but get the above
    error.

    The error occurs on the last line...

    Dim oRootDSE, oCon, oCmd, oRecordSet
    Dim sDomainADsPath, sUser, sPassword, sGroup, sProperties
    Dim aDescription, aMember, iCount

    Set oRootDSE = GetObject("LDAP://RootDSE")
    sDomainADsPath = "LDAP://" & oRootDSE.Get("defaultNamingContext")
    Set oRootDSE = Nothing

    Response.Write sDomainADsPath

    Set oCon = Server.CreateObject("ADODB.Connection")

    sUser = ""
    sPassword = ""

    oCon.Provider = "ADsDSOObject"

    oCon.Open "ADProvider", sUser, sPassword

    Set oCmd = Server.CreateObject("ADODB.Command")
    Set oCmd.ActiveConnection = oCon

    sProperties = "name,ADsPath,description,member"
    sGroup = "*"

    oCmd.CommandText = "<" & sDomainADsPath & ">;(&(objectCategory=group)(name="
    & sGroup & "));" & sProperties & ";subtree"
    oCmd.Properties("Page Size") = 100

    Set oRecordSet = oCmd.Execute
     
    Ollie, Apr 28, 2004
    #1
    1. Advertising

  2. Ollie

    Ollie Guest

    Managed to sort this one myself. Bit of a rookie mistake. username needs to
    be "domain\username" not just "username" DOH!

    "Ollie" <> wrote in message
    news:...
    Ok, I'm new to ADSI and am trying use the following code but get the above
    error.

    The error occurs on the last line...

    Dim oRootDSE, oCon, oCmd, oRecordSet
    Dim sDomainADsPath, sUser, sPassword, sGroup, sProperties
    Dim aDescription, aMember, iCount

    Set oRootDSE = GetObject("LDAP://RootDSE")
    sDomainADsPath = "LDAP://" & oRootDSE.Get("defaultNamingContext")
    Set oRootDSE = Nothing

    Response.Write sDomainADsPath

    Set oCon = Server.CreateObject("ADODB.Connection")

    sUser = ""
    sPassword = ""

    oCon.Provider = "ADsDSOObject"

    oCon.Open "ADProvider", sUser, sPassword

    Set oCmd = Server.CreateObject("ADODB.Command")
    Set oCmd.ActiveConnection = oCon

    sProperties = "name,ADsPath,description,member"
    sGroup = "*"

    oCmd.CommandText = "<" & sDomainADsPath & ">;(&(objectCategory=group)(name="
    & sGroup & "));" & sProperties & ";subtree"
    oCmd.Properties("Page Size") = 100

    Set oRecordSet = oCmd.Execute
     
    Ollie, Apr 29, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. LT
    Replies:
    7
    Views:
    2,101
    Phlip
    Jul 25, 2004
  2. Wake-Up-Jeff

    Table does not exist error.

    Wake-Up-Jeff, Apr 14, 2009, in forum: ASP .Net
    Replies:
    3
    Views:
    1,100
    Wake-Up-Jeff
    Apr 20, 2009
  3. Wake-Up-Jeff

    Table does not exist error

    Wake-Up-Jeff, Apr 14, 2009, in forum: ASP .Net Security
    Replies:
    3
    Views:
    1,384
    Joe Kaplan
    Apr 20, 2009
  4. Aaron_TekRecycle.com

    table does not exist error in AD query?

    Aaron_TekRecycle.com, Jul 25, 2003, in forum: ASP General
    Replies:
    0
    Views:
    252
    Aaron_TekRecycle.com
    Jul 25, 2003
  5. USBCGT

    error '80040e37'

    USBCGT, May 19, 2004, in forum: ASP General
    Replies:
    1
    Views:
    276
    Aaron Bertrand [MVP]
    May 20, 2004
Loading...

Share This Page