kmria
kmria

Reputation: 241

SSIS package writing to CRM 2011 Data type error

enter image description hereWe are trying to push a single order in to MS CRM (dev instance) via SSIS package. Most of the columns coming from source (staging table) are of data type 'DT_STR' and their mapped fields in CRM are of 'DT_WSTR' data type.

I already looked for the solution on this site but in all cases the question is for converting wstr to str. In my case I need to convert str to wstr. when I run the package I get error saying,

Column xxxx cannot convert between unicode and non unicode string data type

I have already tried two solution:
1. Right click on the OLE source and convert datatype to wstr and
2. Using 'Data Conversion'

In both cases the error remains the same. Has anyone else had similar issue?

Upvotes: 0

Views: 225

Answers (1)

Justin
Justin

Reputation: 9724

In OLE DB Source properties don't change data types. If you want you can change in

  1. SELECT statement in OLE DB source.
  2. you can change in 'Data Conversion'
  3. Derived Column element

In Derived Column element code is:

(DT_WSTR, 50)([YourString])

Don't replace column, add new column in Derived column element.

You doing something wrong if you can't convert, you don't give real error message (or picture of your design), real error message is in Output window when you execute the package.

Upvotes: 1

Related Questions