Last post Nov 10, 2010 04:10 PM by Postholes
Nov 10, 2010 12:41 PM|Postholes|LINK
I'm working on a project to make a phone list that is populated from active directory that would allow a user to sort/filter based on location, office, department, and or name. I am having a few issues but will only list my main problem here for the moment.
My first issue is speed, if I can't fix this then the whole approach is going be canned and we'll have to work on another way. I've used this as a base for my search. I've modified it a bit but I'm still finding records, creating columns and rows, then putting
the rows into a table, then creating a dataset with the table and setting that as a datasource to my gridview:
When I change the directorysearcher filter to get the whole organization of almost 5000 records the search takes just over a minute. This isn't going to work for our needs.
I've been given the suggestion to possibly use the method above but instead of putting it as a gridveiw datasource in page have it send the table/dataset to a sql table. Then use the sql table for the datasource of the gridview. This way the sql can update
itself in the background every 5-10 minutes and user loadtime for the gridview should be fairly quick coming from an sql server. I don't know how I would implement this idea. Suggestions would be appreciated if this is going to be the best option. (We've looked
into trying to get sql to pull the active directory itself but keep running into some very large walls. A good resource on this might help too.)
Thanks for any help and suggestions!!
Nov 10, 2010 02:25 PM|smirnov|LINK
There is no need to update it every 5 min. Even your Outlook is most probably updates its address book only x1 a day. Create a script or console application which will copy all contacts into a database. Run it every day using a scheduled task. Use database
to search through contacts.
Nov 10, 2010 04:10 PM|Postholes|LINK
I was doing a little research after posting and read a little bit about the DataAdapter Class on msdn. So when I can get a Database and table opened up to me, probably not until tomorrow. I will change what I have now to write to the new table.