Question
· Jul 14, 2023

How can I cast %String to varchar(max)

Hi all, 

We are doing a SQL server upgrade to SQL server v.15 from a legacy server which had v.10 . I have our Cache server as a linked server int order to pull data from our system. When building out the ROWSPEC, I have my fields typed as %String with various lengths with one field having a max length of 15000. The SQL server is trying to interpret this as a text data type instead of varchar(n). Text is a depracated data type since SQL server 2008. The error below is produced when trying to query from this view

OLE DB provider "MSDASQL" for linked server "SQ_PROD_USER" returned message "Requested conversion is not supported.".
Msg 7341, Level 16, State 2, Line 2
Cannot get the current row value of column "[MSDASQL].DRIVER" from OLE DB provider "MSDASQL" for linked server "SQ_PROD_USER". 

Is there any way to alter the type casting to prevent the server from trying to assign to text instead of varchar? 

Product version: Caché 2014.1
$ZV: 2014.1.5.851.7
Discussion (1)2
Log in or sign up to continue