• I am having a similar issue. If I run the following query in SQL 2005 it runs fine but gives an error in SQL 2008.

    SELECT *

    FROM OPENQUERY(ADSI, 'SELECT sAMAccountName, ipPhone, department,

    displayName, homePhone, mail, mobile, company,

    sn, l, telephoneNumber, givenName, title,

    physicalDeliveryOfficeName

    FROM ''LDAP://OU=xxx,DC=xxx,DC=xxx'' WHERE

    objectCategory = ''Person'' AND objectClass = ''user'' ')

    where company is not null

    The error is -

    Msg 7330, Level 16, State 2, Line 1

    Cannot fetch a row from OLE DB provider "ADSDSOObject" for linked server "ADSI".

    It seems to error after a certain number of rows (which is different everyday). If I amend the query to include the Top N clause it runs fine. That is not a solution, searching on the internet has yielded no clues.

    Any thoughts anyone.