Re: Querying AD..limit?
- From: "CD" <mcdye1@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 7 Jul 2005 09:04:10 -0500
Thanks for the reply Richard,
Yes if I rem out the sort line it runs.
"Richard Mueller [MVP]" <rlmueller-NOSPAM@xxxxxxxxxxxxxxxxxxxx> wrote in
message news:OjOGAkvgFHA.3940@xxxxxxxxxxxxxxxxxxxxxxx
> Hi,
>
> ADO can handle many more than 10,000 records. Does it help if you do not
> sort? The employeeNumber attribute is not indexed.
>
> --
> Richard
> Microsoft MVP Scripting and ADSI
> Hilltop Lab web site - http://www.rlmueller.net
> --
> "CD" <mcdye1@xxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:uMClj5ugFHA.3220@xxxxxxxxxxxxxxxxxxxxxxx
>> I have been running the following script within a SQL DTS package daily
> for
>> over two months. Now I am getting the following error.
>>
>> I went back to a previous day that was a success and noticed I had 9969
>> results. I used csvde to get the same records and now I am over 10,000
>> could this be may problem? How to get around?
>>
>> --------------------------------------
>> Error code: 0
>> Error Source: Provider
>> Error Description: The server does not support the requested critical
>> extension.
>>
>> Error on Line 41
>> The server does not support the requested critical extension
>> ---------------------------------------
>>
>> Line 41 is > objRecordSet.MoveFirst
>>
>> '**********************************************************************
>> ' Visual Basic ActiveX Script
>> '************************************************************************
>>
>> Function Main()
>>
>> 'declarations
>>
>> Dim objConnection, objcommand, strDomainString
>> Dim strmail, stremployeeNumber
>> Dim fso, f1, OutputLine1
>> dim strcn
>>
>> Const ForReading = 1, ForWriting = 2, ForAppend = 8
>> Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0
>> Const FilePath = "d:\"
>> Const FileName = "IDEmail"
>>
>> strDomainString = "dc=ad,dc=union,dc=edu"
>>
>> 'set text file
>> Set fso = CreateObject("Scripting.FileSystemObject")
>> Set f1 = fso.OpenTextFile(FilePath & FileName & ".txt", ForWriting,
> True)
>>
>> 'Search AD
>> Set objConnection = CreateObject("ADODB.Connection")
>> Set objCommand = CreateObject("ADODB.Command")
>> objConnection.Provider = "ADsDSOObject"
>> objConnection.Open "Active Directory Provider"
>> Set objCommand.ActiveConnection = objConnection
>>
>> objCommand.Properties("Page Size") = 1000
>>
>> objCommand.Properties("Sort On") = "employeeNumber"
>>
>> objCommand.CommandText = _
>> "<LDAP://" & strDomainString &
>> ">;(&(objectcategory=person)(objectclass=user)(employeeNumber=*));" & _
>> "employeeNumber,mail;Subtree"
>>
>> Set objRecordSet = objCommand.Execute
>>
>> objRecordSet.MoveFirst
>> Do Until objRecordSet.EOF
>>
>> stremployeeNumber = objRecordSet.Fields.Item("employeeNumber").Value
>>
>> strmail = objRecordSet.Fields.Item("mail")
>>
>> 'strcn = objRecordSet.Fields.Item("sAMAccountName").Value
>>
>> ' Write to log file
>>
>> OutputLine1 = "" & strmail & vbTab & stremployeeNumber &""
>> 'OutputLine1 = "" & stremployeeNumber & vbTab & strmail & vbTab & strcn
> &""
>> f1.WriteLine OutputLine1
>>
>> objRecordSet.MoveNext
>>
>> Loop
>>
>> objConnection.Close
>> f1.Close
>>
>>
>> Main = DTSTaskExecResult_Success
>> End Function
>>
>>
>
>
.
- References:
- Querying AD..limit?
- From: CD
- Re: Querying AD..limit?
- From: Richard Mueller [MVP]
- Querying AD..limit?
- Prev by Date: Re: Dropping a space in Request.QueryString
- Next by Date: Re: HELP! Need AD Query for Last login
- Previous by thread: Re: Querying AD..limit?
- Next by thread: won't get a match in a check for computermodel.
- Index(es):
Relevant Pages
|