2

I have established linked server connection, it is working fine but got some problem with 2 fields, Col1 which got datatype varchar(10000) and also same for Col2 varchar(10000) from source. when I queried:

select 
    * 
from 
    [MySQL_Linked]...SorceTbl

I got the below error:

OLE DB provider "MSDASQL" for linked server "MySQL_Linked" returned message "Requested conversion is not supported.".

Msg 7341,

Level 16, State 2, Line 1 Cannot get the current row value of column "[MySQL_Linked]...[MyDB].SorceTbl" from OLE DB provider "MSDASQL" for linked server "MySQL_Linked".

I tried with Cast and Convert but no use. any help?

someone marked this quesion as duplicate but the difference is

his solution is changed data type at source but for me I don't have permissions to change data types from source.

user3583912
  • 1,302
  • 1
  • 17
  • 23
  • Hi @Matt Gibson, you are right but his solution is changed data type at source but for me I don't have permissions to change data types from source. Thanks – user3583912 Jan 29 '16 at 11:37
  • @user3583912 . . . I think the second answer provides a reasonable solution. You may be able to even wrap the logic in a view. – Gordon Linoff Jan 29 '16 at 11:40
  • I'm wondering if casting to a `VARCHAR(MAX)` or `NVARCHAR(MAX)` might work? (If you try that and it works, you should add that as an answer to the earlier question...) – Matt Gibson Jan 29 '16 at 11:59
  • Hi @Matt Gibson, I also tried `VARCHAR(MAX)` but still same error. I also updated latest MySQL Driver as well but no use. I really don't know what to do? Thanks – user3583912 Jan 29 '16 at 12:44
  • Could you show us your code for an attempted cast, and confirm that you're getting the same error message as you were originally? I've voted to re-open, as I think this question may be sufficiently different, plus that question is quite old and some of the advice (e.g. use the obsolete `TEXT` type) isn't that great these days. – Matt Gibson Jan 29 '16 at 14:41
  • Hi @Matt Gibson, look at the screen shot. Thanks – user3583912 Jan 29 '16 at 15:10

0 Answers0