|
|
|||||||
I'm doing $Computers = GetObject($ldap) for each $item in $computers next but I need to know how many objects are in $computers first... I want to put a progressbar integral to the for each. $max=ubound($computers) doesn't work [ 15. March 2003, 02:12: Message edited by: Radimus ] |
||||||||
|
|
|||||||
My, you're feeling awfuly "needy" this evening. First thought is brute force.. code:But isn't $Computers an ordinary array? Any idea why UBound() won't work? Gotta go raise my sugar level before I give ya any more brain cells. Glenn |
||||||||
|
|
|||||||
How about code:$Computers = GetObject($ldap) [ 15. March 2003, 02:28: Message edited by: sealeopard ] |
||||||||
|
|
|||||||
I've tried: $Computers = GetObject($area) ? $computers.count ? ubound($computers) $max=0 for each $c in $computers $max=$max+1 next the for each works, but it is kludgy... |
||||||||
|
|
|||||||
Yes, the ubound will definitely not work as it's not an array. The .Count should work for anything that has been retrieved via WQL query in synchronus mode. It will not work in semi-synchronous or asynchronous mode. I actually do code:This way I end up with an array or objects, e.g. $comparray[0].value (I believe). Check the ReadEventlog() UDF, I'm using it in there.$Computers = GetObject($area) |
||||||||
|
|
|||||||
Anybody good at using ADO and LDAP SQL dialect? Can one "select count from a collection"? Example SQL dialect: Select ADsPath, cn FROM 'LDAP://O=Internet/DC=COM/DC=ARCADIABAY/DC=ARCADIADEV' where objectClass='group' |
||||||||
|
|
|||||||
Maybe code:?Select Count(ADsPath) FROM 'LDAP://O=Internet/DC=COM/DC=ARCADIABAY/DC=ARCADIADEV' where objectClass='group' Just shooting from the hip |