Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

boucle sans fin

1 réponse
Avatar
Sylvain
Salut a tous

dans mon bout de code ci dessous apres un bon bout de=20
temps j'ai l'erreur suivante:
-2147016669 The size limit for this request was exceeded
et il entre dans une boucle sans fin car il n'avance plus=20
donc n'ateint pas le EOF !!

Quelqu'un a une id=E9e du pourquoi ?

Merci


Set objRecordSet =3D objCommand.Execute=20
While Not objRecordset.EOF
groupe =3D objRecordset.Fields("distinguishedName")
sname =3D Split(groupe,",", -1, 1)
if err.number <> 0 then wscript.echo("erreur : " &=20
err.number & " " & err.description)=20
wscript.echo("le sname : " & sname)
If objRecordset.Fields("primaryGroupToken") =3D=20
intPrimaryGroupID Then
If Not (dic.Exists(Ucase(Mid(sname(0),4)))) then
dic.Add Ucase(Mid(sname(0),4)),Ucase(Mid
(sname(0),4))
End If
End If
If Ucase(Mid(sname(0),4)) =3D UCase(PrimarySiteId) Then
If Not (dic.Exists(Ucase(Mid(sname(0),4)))) then
dic.Add Ucase(Mid(sname(0),4)),Ucase(Mid
(sname(0),4))
End If
End if
objRecordset.MoveNext
Wend


-2147016669 The size limit for this request was exceeded

1 réponse

Avatar
Sylvain
Voila la solution !!

objCommand.Properties("Page Size") = 1000
objCommand.Properties("Timeout") = 30
objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE
objCommand.Properties("Cache Results") = False

-----Message d'origine-----
Salut a tous

dans mon bout de code ci dessous apres un bon bout de
temps j'ai l'erreur suivante:
-2147016669 The size limit for this request was exceeded
et il entre dans une boucle sans fin car il n'avance
plus

donc n'ateint pas le EOF !!

Quelqu'un a une idée du pourquoi ?

Merci


Set objRecordSet = objCommand.Execute
While Not objRecordset.EOF
groupe = objRecordset.Fields("distinguishedName")
sname = Split(groupe,",", -1, 1)
if err.number <> 0 then wscript.echo("erreur : " &
err.number & " " & err.description)
wscript.echo("le sname : " & sname)
If objRecordset.Fields("primaryGroupToken") =
intPrimaryGroupID Then
If Not (dic.Exists(Ucase(Mid(sname(0),4)))) then
dic.Add Ucase(Mid(sname(0),4)),Ucase(Mid
(sname(0),4))
End If
End If
If Ucase(Mid(sname(0),4)) = UCase(PrimarySiteId) Then
If Not (dic.Exists(Ucase(Mid(sname(0),4)))) then
dic.Add Ucase(Mid(sname(0),4)),Ucase(Mid
(sname(0),4))
End If
End if
objRecordset.MoveNext
Wend


-2147016669 The size limit for this request was exceeded
.