• With SQL2005, how come when I try to execute

    SELECT * FROM OPENQUERY(ADSI,'SELECT name

    FROM ''LDAP://server''

    WHERE objectCategory = ''Person'' AND objectClass = ''user''

    I am getting

    Msg 7399, Level 16, State 1, Line 1

    The OLE DB provider "ADsDSOObject" for linked server "adsi" reported an error. The provider indicates that the user did not have the permission to perform the operation.

    Msg 7321, Level 16, State 2, Line 1

    An error occurred while preparing the query "SELECT name

    FROM ''LDAP://server''

    WHERE objectCategory = ''Person'' AND objectClass = ''user''".

    But when I used OPENROWSET, it works?

    I will like to keep using the OPENQUERY, snce I dont want to modify all my code.

    Thanks