Written by

Question Kyle Johnson · Dec 29, 2017

OLE DB provider 'MSDASQL' for linked server returned data that does not match expected data length for column

I setup a linked server to a cache database to query the data and when I try an query the data I get 

OLE DB provider 'MSDASQL' for linked server 'xxx' returned data that does not match expected data length for column '[MSDASQL].CSFAELIGVENCITY'. The (maximum) expected data length is 20, while the returned data length is 23.

Should I be using a different driver when setting up the DSN?
 

Comments

Robert Cemper · Dec 29, 2017

Check MAXLEN for Property CSFAELIGVENCITY wherever that was defined.
 

As MAXLENis not checked for data output you may want to use a SQLcomputed property
that limits output to 20.

eg. {set {*}=$Extract(CSFAELIGVENCITY,1,20) }

0
Kyle Johnson  Jan 25, 2018 to Robert Cemper

I'm not understanding. I'm querying data through a linked server connection using SQL Server Management Studio. I doing a simple select * from table and getting that error. My Sr DBA can query the data fine through other tools and get no errors, so I'm thing it's SQL Server specific. H

Any help would be appreciated.

0
Jeff Cleath · Aug 2, 2024

I have the same problems with a lot of different queries for different tables.  Did you ever find a solutions?

0