I have a linked server using ADSI. I can successfully query for most attributes except description
.
My query:
SELECT * FROM OpenQuery (ADSI,
'SELECT description,sn,givenName
FROM ''LDAP://mydomain.com/OU=users,DC=com,DC=mydomain''
WHERE title<>''Virtual'' AND (userAccountControl=''66048'' OR
userAccountControl=''512'')')
ORDER BY sn
It throws this error:
"Cannot get the data of the row from the OLE DB provider "ADSDSOObject" for linked server "ADSI". Could not convert the data value due to reasons other than sign mismatch or overflow."
What is the problem here?