Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADSI connection

Status
Not open for further replies.

legrooch

Programmer
Joined
Jun 11, 2003
Messages
5
Location
PL
I'm trying to connect to Active Directory. I'm using this code (running from SQL Analyzer ofcourse)

EXEC sp_addlinkedserver 'ADSI', 'Active Directory Services 2.5', 'ADSDSOObject', 'adsdatasource'

I'm also using:

sp_addlinkedsrvlogin ADSI, FALSE, 'yourusername', 'CN=yourusername,CN=Users,DC=yourdomain,DC=com', 'yourpassword'

The last is (with I have a problem):

SELECT * FROM ''LDAP://DC=XXX,DC=XXX''

After this i have an error, that "Invalid object name 'LDAP://DC=XXX,DC=XXX'.
What I'm doing wrong?
 
This has absolutely nothing to do with ANSI SQL. If you really want an answer I suggest you look for another forum. Good luck.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top