skip to content »

Updating multiple fields in access

updating multiple fields in access-37

These are self explanatory in use once you have retrieved the object from AD so are not included in the examples!

updating multiple fields in access-86updating multiple fields in access-21updating multiple fields in access-30updating multiple fields in access-86

For example the properties of the AD objects (description, telephone etc.) are all held in an array which can present its own problems and involve a lot of iteration and use of casting since they are all generic objects.If the user scrolls the list, then the rows and their associated views will be scrolled out of the visible area.The Java objects which represent the rows can be reused for newly visible rows.If you can read and understand these examples you should be able to apply the principles to much larger and very powerful programs as I have done.Obviously you need to be careful with this kind of programming and where ever possible you shouldn’t be testing on a live environment.In order to try out the examples you will need to edit this function and enter both a hostname for your own AD server and also an appropriate search path.

I have left in as examples the paths that I used when creating the programs.

These first examples all use the older approach and will serve you best if you are writing a large or complex AD management program.

In all of the examples where the program asks for a username the program then matches this to the field , which is what the AD GUI refers to as ‘Full Name’ and is what is listed as ‘name’ in the tabulated account lising of Active Directory Users and Computers.

If you are logged into a system as a domain administrator or a user with appropriate privilages then you should not need to specify a username and password for the connection.

However, if you are running the program as an unprivilaged user then you will need to add (or prompt for and program accordingly) a username and password to the This first example will introduce you to the classes needed for querying the AD using C#.

It exposes only a small number of the LDAP fields that you may want to use (name, description, email, home dir and phone is about it) so if you need access to a more obscure property it won’t suffice.