WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

ADSI
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

275 Search Return Too Many Object Paths

 Keywords:  whenCreated 275 Search Return Too Many Object Paths

Question:

I need to get the LDAP of all the accounts that were created after some specific time. It looks simple but I have problem with the format of the date-time that I have to provide to the whenCreated. Below is my coding:
 sSearchPoint = "LDAP://OU=abc,DC=stu,DC=xyz,DC=com" 
 timeset = "2013:05:15:00:00:00" ;WIL Extender Error: 275:Search return too many object paths
 timeset1 = "20130515000000.0Z" ;WIL Extender Error: 264: time value is invalid
 timeset2 = "130515000000Z" ;WIL Extender Error: 264: time value is invalid
 sSearch = "(&(objectClass=user)(whenCreated>%timeset%))"
 lResult = dsFindPath(sSearchPoint, sSearch) 
Without (whenCreated>%timeset%) everything is fine, we got all the users with timeset = "2013:05:15:00:00:00",we got: WIL Extender Error: 275:Search return too many object paths

What format do I need to provide to the whenCreated?

Answer:

"2013:05:15:00:00:00" is the correct format. The extender automagically converts WIL YMDHMS time to the syntax expected by the DS. Your problem has to do with the the operator you are using in your search filter. The LDAP search filter syntax does not support a '<' relational operator. You need to use either '<=' or '>=' instead. Error 275 is almost always caused by bad filter syntax.

Also keep in mind that 'whenCreate<=' returns objects with a date the same or older than specified while 'whenCreate>=' returns objects with a date the same or younger than the date specified.

Reference: http://msdn.microsoft.com/en-us/library/windows/desktop/aa746475(v=vs.85).aspx


Article ID:   W17518
Filename:   275 Search Return Too Many Object Paths.txt
File Created: 2013:05:20:11:08:50
Last Updated: 2013:05:20:11:08:50