PC Review


Reply
Thread Tools Rate Thread

Connecting to Active Directory

 
 
MadCrazyNewbie
Guest
Posts: n/a
 
      7th May 2004
Hey Group,

Hope Somebody could possibly help?

I would like to be able to connect to our Windows 2000 Active Directory,
download a list of users and import it into a access database?

Only Problem is, if the user already exsists in the Access Table, I don`t
want it to import the user again. Only the users that have been added to the
W2k AD since my last import. The only feild I want from AD is Display Name.

Is this possible? Anybody got any examples?

Many Thanks
Si



 
Reply With Quote
 
 
 
 
William Ryan eMVP
Guest
Posts: n/a
 
      7th May 2004
Here's a simple example of how to query AD.
http://www.knowdotnet.com/articles/d...yservices.html You can use the
DirectoryServices namespace. I'd iterate through it and either get the list
of existing users beforehand and then check against it before I do my
additions or do the check before I try to enter them. Find a good PK value
to ensure no dupes make it in there.

There may be a direct import function, but I don't know AD all that well and
from what i know query Access and doing the checks isn't supported natively

Bill

www.devbuzz.com
www.knowdotnet.com

"MadCrazyNewbie" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hey Group,
>
> Hope Somebody could possibly help?
>
> I would like to be able to connect to our Windows 2000 Active Directory,
> download a list of users and import it into a access database?
>
> Only Problem is, if the user already exsists in the Access Table, I don`t
> want it to import the user again. Only the users that have been added to

the
> W2k AD since my last import. The only feild I want from AD is Display

Name.
>
> Is this possible? Anybody got any examples?
>
> Many Thanks
> Si
>
>
>



 
Reply With Quote
 
MadCrazyNewbie
Guest
Posts: n/a
 
      7th May 2004
William Thanks for you reply, when I try to run the code it tells me:

D:\test1\Form1.vb(59): Type 'DirectoryEntry' is not defined.
D:\test1\Form1.vb(61): Type 'WindowsIdentity' is not defined.

Any Ideas?

Many Thanks
MCN

"William Ryan eMVP" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Here's a simple example of how to query AD.
> http://www.knowdotnet.com/articles/d...yservices.html You can use the
> DirectoryServices namespace. I'd iterate through it and either get the

list
> of existing users beforehand and then check against it before I do my
> additions or do the check before I try to enter them. Find a good PK

value
> to ensure no dupes make it in there.
>
> There may be a direct import function, but I don't know AD all that well

and
> from what i know query Access and doing the checks isn't supported

natively
>
> Bill
>
> www.devbuzz.com
> www.knowdotnet.com
>
> "MadCrazyNewbie" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Hey Group,
> >
> > Hope Somebody could possibly help?
> >
> > I would like to be able to connect to our Windows 2000 Active Directory,
> > download a list of users and import it into a access database?
> >
> > Only Problem is, if the user already exsists in the Access Table, I

don`t
> > want it to import the user again. Only the users that have been added to

> the
> > W2k AD since my last import. The only feild I want from AD is Display

> Name.
> >
> > Is this possible? Anybody got any examples?
> >
> > Many Thanks
> > Si
> >
> >
> >

>
>



 
Reply With Quote
 
William Ryan eMVP
Guest
Posts: n/a
 
      7th May 2004
Imports System.DirectoryServices

"MadCrazyNewbie" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> William Thanks for you reply, when I try to run the code it tells me:
>
> D:\test1\Form1.vb(59): Type 'DirectoryEntry' is not defined.
> D:\test1\Form1.vb(61): Type 'WindowsIdentity' is not defined.
>
> Any Ideas?
>
> Many Thanks
> MCN
>
> "William Ryan eMVP" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Here's a simple example of how to query AD.
> > http://www.knowdotnet.com/articles/d...yservices.html You can use

the
> > DirectoryServices namespace. I'd iterate through it and either get the

> list
> > of existing users beforehand and then check against it before I do my
> > additions or do the check before I try to enter them. Find a good PK

> value
> > to ensure no dupes make it in there.
> >
> > There may be a direct import function, but I don't know AD all that well

> and
> > from what i know query Access and doing the checks isn't supported

> natively
> >
> > Bill
> >
> > www.devbuzz.com
> > www.knowdotnet.com
> >
> > "MadCrazyNewbie" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > Hey Group,
> > >
> > > Hope Somebody could possibly help?
> > >
> > > I would like to be able to connect to our Windows 2000 Active

Directory,
> > > download a list of users and import it into a access database?
> > >
> > > Only Problem is, if the user already exsists in the Access Table, I

> don`t
> > > want it to import the user again. Only the users that have been added

to
> > the
> > > W2k AD since my last import. The only feild I want from AD is Display

> > Name.
> > >
> > > Is this possible? Anybody got any examples?
> > >
> > > Many Thanks
> > > Si
> > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
MadCrazyNewbie
Guest
Posts: n/a
 
      7th May 2004
Hi William, i`ve put Imports System.DirectoryService at the top of my page
but now get:

D:\Test Apps\test1\Form1.vb(1): Namespace or type 'DirectoryServices' for
the Imports 'System.DirectoryServices' cannot be found.

Any Ideas? Many Thanks for any help in advance

Ta
MCN

"William Ryan eMVP" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Imports System.DirectoryServices
>
> "MadCrazyNewbie" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > William Thanks for you reply, when I try to run the code it tells me:
> >
> > D:\test1\Form1.vb(59): Type 'DirectoryEntry' is not defined.
> > D:\test1\Form1.vb(61): Type 'WindowsIdentity' is not defined.
> >
> > Any Ideas?
> >
> > Many Thanks
> > MCN
> >
> > "William Ryan eMVP" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > Here's a simple example of how to query AD.
> > > http://www.knowdotnet.com/articles/d...yservices.html You can use

> the
> > > DirectoryServices namespace. I'd iterate through it and either get

the
> > list
> > > of existing users beforehand and then check against it before I do my
> > > additions or do the check before I try to enter them. Find a good PK

> > value
> > > to ensure no dupes make it in there.
> > >
> > > There may be a direct import function, but I don't know AD all that

well
> > and
> > > from what i know query Access and doing the checks isn't supported

> > natively
> > >
> > > Bill
> > >
> > > www.devbuzz.com
> > > www.knowdotnet.com
> > >
> > > "MadCrazyNewbie" <(E-Mail Removed)> wrote in message
> > > news:(E-Mail Removed)...
> > > > Hey Group,
> > > >
> > > > Hope Somebody could possibly help?
> > > >
> > > > I would like to be able to connect to our Windows 2000 Active

> Directory,
> > > > download a list of users and import it into a access database?
> > > >
> > > > Only Problem is, if the user already exsists in the Access Table, I

> > don`t
> > > > want it to import the user again. Only the users that have been

added
> to
> > > the
> > > > W2k AD since my last import. The only feild I want from AD is

Display
> > > Name.
> > > >
> > > > Is this possible? Anybody got any examples?
> > > >
> > > > Many Thanks
> > > > Si
> > > >
> > > >
> > > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
William Ryan eMVP
Guest
Posts: n/a
 
      7th May 2004
Go to Project and select Add Reference. From there, under the .NET
references, reference System.DirectoryServices.dll
"MadCrazyNewbie" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi William, i`ve put Imports System.DirectoryService at the top of my page
> but now get:
>
> D:\Test Apps\test1\Form1.vb(1): Namespace or type 'DirectoryServices' for
> the Imports 'System.DirectoryServices' cannot be found.
>
> Any Ideas? Many Thanks for any help in advance
>
> Ta
> MCN
>
> "William Ryan eMVP" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Imports System.DirectoryServices
> >
> > "MadCrazyNewbie" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > William Thanks for you reply, when I try to run the code it tells me:
> > >
> > > D:\test1\Form1.vb(59): Type 'DirectoryEntry' is not defined.
> > > D:\test1\Form1.vb(61): Type 'WindowsIdentity' is not defined.
> > >
> > > Any Ideas?
> > >
> > > Many Thanks
> > > MCN
> > >
> > > "William Ryan eMVP" <(E-Mail Removed)> wrote in message
> > > news:(E-Mail Removed)...
> > > > Here's a simple example of how to query AD.
> > > > http://www.knowdotnet.com/articles/d...yservices.html You can

use
> > the
> > > > DirectoryServices namespace. I'd iterate through it and either get

> the
> > > list
> > > > of existing users beforehand and then check against it before I do

my
> > > > additions or do the check before I try to enter them. Find a good

PK
> > > value
> > > > to ensure no dupes make it in there.
> > > >
> > > > There may be a direct import function, but I don't know AD all that

> well
> > > and
> > > > from what i know query Access and doing the checks isn't supported
> > > natively
> > > >
> > > > Bill
> > > >
> > > > www.devbuzz.com
> > > > www.knowdotnet.com
> > > >
> > > > "MadCrazyNewbie" <(E-Mail Removed)> wrote in message
> > > > news:(E-Mail Removed)...
> > > > > Hey Group,
> > > > >
> > > > > Hope Somebody could possibly help?
> > > > >
> > > > > I would like to be able to connect to our Windows 2000 Active

> > Directory,
> > > > > download a list of users and import it into a access database?
> > > > >
> > > > > Only Problem is, if the user already exsists in the Access Table,

I
> > > don`t
> > > > > want it to import the user again. Only the users that have been

> added
> > to
> > > > the
> > > > > W2k AD since my last import. The only feild I want from AD is

> Display
> > > > Name.
> > > > >
> > > > > Is this possible? Anybody got any examples?
> > > > >
> > > > > Many Thanks
> > > > > Si
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Connecting a Windows 98 pc to Active Directory =?Utf-8?B?U0VnZXJ0b24=?= Microsoft Windows 2000 Active Directory 2 20th Sep 2006 08:58 AM
connecting to Active Directory over the internet without VPN David Lee Windows XP Configuration 0 15th Aug 2006 02:59 AM
Connecting to Active Directory through ASP.NET Web form =?Utf-8?B?bXVsdGlzeW5j?= Microsoft ASP .NET 2 25th Nov 2005 03:49 PM
Problems connecting to Active Directory Maria Isabel Henao Microsoft Dot NET Framework 4 15th Nov 2003 12:27 AM
connecting two active directory domains Dave Microsoft Windows 2000 Active Directory 2 4th Sep 2003 12:01 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:09 PM.