From: David A. P. <dpi...@un...> - 2001-06-06 18:56:21
|
I've added the sort controls now. I have tested the sort control alone and it works. But with vlv it gives me trouble. Here is my new code: -- $vlv = Net::LDAP::Control::VLV->new( before => 0, # No entries before target entry after => 2, # number of entries after target entry content => 0, #If set to 0, list size is unknown offset => 1, # Target entry is the first ); $sort = Net::LDAP::Control::Sort->new( order => "sn givenname" ); $mesg=$ldap->search( filter => '(&(|(|(sn=*) (givenname=*)) (mail=*))(objectclass=person))', base => 'ou=People,o=company.com', attrs => $anonAttr, control => [ $sort, $vlv ], ); ($resp) = $mesg->control( LDAP_CONTROL_VLVRESPONSE ) or die; $vlv->response( $resp ); -- If I leave the last two lines on, I will die when getting the VLVRESPONSE. If I remove those lines, I get an error 1, which I understand is an LDAP Operations Error. I'm not sure what I'm doing wrong or what I should look for. I believe that I have copied sample code from the documentation correctly. Any advice? Thanks to those who have responded already. -- David A. Pinkowitz UniPress Software, Inc. dpi...@un... (732) 287-2100 ext. 943 |