Unable to cast object of type 'System.Decimal' to type 'System.Char[]'

Hi All,

I am using SSIS for long time and I know in English what this error message is saying but Ah! did everything but keep getting same error as if all my try are at wrong place.

Trying to move data in Sybase IQ from one database (prod) to qa for a table. Using ADO.NET connection and just one Data Flow task , source , destination. Using Sybase IQ driver.

Error:

[ADO NET Destination [2]] Error: An exception has occurred during data insertion, the message returned from the provider is: Unable to cast object of type 'System.Decimal' to type 'System.Char[]'.

Nether source or target table have column with data type Decimal or Char. All types I have in table are numeric (54,15) , bigint, varchar, date.  

Any idea?

Thanks - AK 

August 20th, 2015 10:48pm

Hi Ashok,

It may be possible to solve this issue by applying a Data Conversion Transformation component in between the source and destination.

Converting to DT_STR must work, but not sure

Free Windows Admin Tool Kit Click here and download it now
August 21st, 2015 12:09am

Hi Milan,

It is possible, because for testing I changed all my numeric(54,15) to varchar in source system and than I am able to move data to target. The issue with this is in target db again those varchar needs to change to numeric(54,14).

With using Data Conversion and DT_STR we will be doing something same. The ideal solution should be able to move data between two databases (in my case Sybase IQ) with out changing data type. In fact I still can not do it because I have very large amount of data and converting data type in this process will not work. It may be okay for hundreds of records but 5 to 10 millions will take few days.

Thanks

August 21st, 2015 11:35am

Sounds to me like your meta data has gotten chewed up. Right click on the source/destination and choose advanced options. In the input/output tab check that the columns have appropriate meta data shown.
Free Windows Admin Tool Kit Click here and download it now
August 21st, 2015 11:52am

if you are using SSIS 2012 and above, use ODBC to make Sybase connection to get better performance over ADO.NET

https://blogs.datadirect.com/2012/10/three-things-to-love-about-native-ssis-odbc-components-new-to-sql-server-integration-services-2012.html

August 21st, 2015 3:26pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics