I have the following code: it's looking for a specific attribute
(roomnumber=666) for the searchFilter, but for some reason it's giving
me a different value within the correct attribute set. So, at least its
looking in the right place, just not the right attribute. Got me
stumped at this point.

public String Attrib()
{
String searchBase = DNtxtName;
String searchFilter = "(roomnumber=666)";
String attributeVal;
String x="";

LdapConnection conn = new LdapConnection();

conn.Connect(path, port);
conn.Bind(DNtxtName, pass);
LdapSearchResults lsc = conn.Search(searchBase,

LdapConnection.SCOPE_SUB,
searchFilter,
null,
false);

while (lsc.hasMore())
{
LdapEntry nextEntry = null;

nextEntry = lsc.next();

LdapAttributeSet attributeSet =
nextEntry.getAttributeSet();
System.Collections.IEnumerator ienum =
attributeSet.GetEnumerator();
while (ienum.MoveNext())
{
LdapAttribute attribute =
(LdapAttribute)ienum.Current;
string attributeName = attribute.Name;
attributeVal = attribute.StringValue;
if (!Base64.isLDIFSafe(attributeVal))
{
byte[] tbyte =
SupportClass.ToByteArray(attributeVal);
attributeVal =
Base64.encode(SupportClass.ToSByteArray(tbyte));
}
x=attributeName+" : "+attributeVal;

}

}

return x;
}


--
vba123
------------------------------------------------------------------------
vba123's Profile: http://forums.novell.com/member.php?userid=79253
View this thread: http://forums.novell.com/showthread.php?t=402664