I am trying to query the Active Directory with the following SQL query, which works perfectly.
SELECT * FROM OpenQuery(ADSI,
'SELECT title, displayName, sAMAccountName, givenName,
telephoneNumber, facsimileTelephoneNumber, sn,
mail, physicalDeliveryOfficeName
FROM ''LDAP://DC=mydomain,DC=org''
WHERE sAMAccountName = ''myUser''')
When I add the description
attribute I get the following error:
Msg 7346, Level 16, State 2, Line 6
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.