Wrox Home  
Search P2P Archive for: Go

  Return to Index  

sql_language thread: ADSI, LINKED SERVER - SQL SERVER 2000


Message #1 by "Gillian Leech" <gillianleech@h...> on Thu, 23 Jan 2003 12:05:16

Hiya,

I've added a linked server to sql server 2000 using the code:

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

When I try to do a select statement using this code:

SELECT * FROM OpenQuery (ADSI, 'SELECT name, adsPath 
FROM "LDAP://DC=domainname,DC=com" WHERE objectCategory="Person" AND 
objectClass="user"')

I get the following error:

Server: Msg 7321, Level 16, State 2, Line 1
An error occurred while preparing a query for execution against OLE DB 
provider 'ADSDSOObject'. 

Can anybody tell me what to do to get this working

Many Thanks

Gill

  Return to Index