![]() |
|
|
|
|
|
|
2
30th October 05:52
External User
Posts: 1
|
You can use IsNull, or you can append a blank string to the value and test
for the blank string. For example: If (IsNull(adoRecordset.Fields("extensionAttribute1") .Value) = False) Then ' Do something. End If or If (adoRecordset.Fields("extensionAttribute1").Value & "" = "") Then ' Do something. End If The clause: (adoADRecordset.Fields("extensionAttribute1").Valu e = "") will never be True and will raise an error when the value is Null. Also, you can use a filter that only returns records where the attribute has a value (or does not have a value). For example to retrieve records for all users that have a value assigned to extensionAttribute1, use the filter: (&(objectCategory=person)(objectClass=user)(extens ionAttribute1=*)) To retrieve records for all users that do not have a value assigned, use the filter: (&(objectCategory=person)(objectClass=user)(!exten sionAttribute1=*)) -- Richard Mueller Microsoft MVP Scripting and ADSI Hilltop Lab - http://www.rlmueller.net -- |
|