Error Selecting on AD Linked Server Columns

Looks like not all columns are born equal on Active Directory linked server on SQL Server.

I have a pretty little view which initially was selecting just four columns (mail, samaccountname,company and displayname) from a linked AD on an SQL Server 2000. Trust me, there was a reason to add more columns to the view. However, my attempt to include all the columns I wanted (valid columns!) was throwing error

Server: Msg 7346, Level 16, State 2, Line 1
Could not get the data of the row from the OLE DB provider ‘ADsDSOObject’. Could not convert the data value due to reasons other than sign mismatch or overflow.

After banging my head on the desk a couple of times, I started debugging by adding a column at a time. In the end, I discovered that the following columns won’t play nice: otherTelephone, otherMobile, otherHomePhone and may be a million other columns like that.

Author: Adedeji Olowe

Adédèjì is the founder of Lendsqr, the loan infrastructure fintech powering lenders at scale. Before this, he led Trium Limited, the corporate VC of the Coronation Group, which invested in Woven Finance, Sparkle Bank, Clane, and L1ght, amongst others. He has almost two decades of banking experience, including stints as the Divisional Head of Electronic Banking at Fidelity Bank Plc. He drove the turnaround of the bank’s digital business. He was previously responsible for United Bank for Africa Group’s payment card business across 19 countries. Alongside other industry veterans, he founded Open Banking Nigeria, the nonprofit driving the development and adoption of a common API standard for the Nigerian financial industry. Beyond open APIs, Adédèjì works deeply within the fintech ecosystem; he’s the board chairman at Paystack. Adédèjì is a renowned fintech pundit and has been blogging on technology and payments at dejiolowe.com since 2001.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.