Invalid character value for cast specification RRS feed

  • Question

  • Hi 

    I was trying to store an ID as  full resultset in a parameter  from target and using that parameter to get data from source server without having linked server.

    I get below error

    [OLE DB Source [211]] Error: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E21.
    An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 11.0"  Hresult: 0x80040E21  Description: "Invalid character value for cast specification".



    • Edited by yoba123 Tuesday, October 1, 2019 7:13 PM
    Tuesday, October 1, 2019 7:12 PM

All replies

  • Hi Yoba123,

    The message means the target datype cannot support the value.

    You need to revise the code.




    Tuesday, October 1, 2019 8:10 PM
  • Hi yoba123,

    Have you tried to set the target data type to be Object?



    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Wednesday, October 2, 2019 2:09 AM