p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Classic ASP Professional (http://p2p.wrox.com/forumdisplay.php?f=63)
-   -   Microsoft VBScript runtime error '800a01b6' (http://p2p.wrox.com/showthread.php?t=34468)

PGSloboda October 20th, 2005 12:10 PM

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 = "abc.com"
        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","*@abc.com*"
      ' objADUserQuery.addFilter "mail","*@abcd.com*"

    '-- 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 aaa.com) to a new corporate entity on this new domain, abc.com.
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.

All times are GMT -4. The time now is 11:31 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.