View Single Post
  #1 (permalink)  
Old October 20th, 2005, 12:10 PM
PGSloboda PGSloboda is offline
Registered User
Join Date: Oct 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Microsoft VBScript runtime error '800a01b6'

Getting this error in code exported from another webserver.

Microsoft VBScript runtime error '800a01b6'

Object doesn't support this property or method: 'objADUserQuery.errorsText'

/commonfunctions.asp, line 48
Function GetGal(strUserID, GalField)
    '-- Create the objADUserQuery Object and assign values to the required properties.
    '-- These must be set for the class to correctly execute.
    Dim objADUserQuery, strIDName
    Set objADUserQuery = New ActiveDirectoryUserQuery
        objADUserQuery.targetDomain = ""
        objADUserQuery.addFilter "cn", strUserId & "*"

    '-- Modify the Filters to narrow or broaden the search.
        objADUserQuery.removeFilter "cn"
        objADUserQuery.setFilter "cn","IN('" & strUserID & "')"

    '-- to ensure you get only user accounts asigned to real people, add
    '-- this mail filter (applications of workstations don't usually get
    '-- email accounts.
      ' objADUserQuery.addFilter "mail","**"
      ' objADUserQuery.addFilter "mail","**"

    '-- Add an order by clause to sort the results.
        objADUserQuery.orderBy = "sn"

    '-- Execute the Query and Process the Results

    '-- Check for Errors. Display errors if they exist.
        If(objADUserQuery.errorCount > 0) Then
Error>>> Response.Write(Replace(objADUserQuery.errorsText,v bCrLf,"<BR>")) <<<

    '-- If no errors exist, process the results set.

Can't for the life of me figure this one out. Basically the userid is parsed from the windows logon and the username token is passed to the getgal function. It performs an ldap read on the active directory and, if all is well, this code never runs. However, if there is something wrong, we perform this to display the object errors. We have migrated a small user community from their old domain (lets say domain to a new corporate entity on this new domain,
The code works as designed on the old domain, however, fails on the new domain and this problem is preventing us from seeing the actual ldap error.

Reply With Quote