SSIS Package Exporting to Access

  • I'm just starting with SSIS and have managed to successfully migrate all of my DTS packages except for one. Yay.

    This package basically takes a view from a SQL 2005 database and exports the view into an Access database every four hours so that another piece of software can reference it. I can't get this export to work because of the "can't convert between unicode and non-unicode string data types" error. I am using a Data Conversion. The source data is DT_STRING and I'm converting to DT_WSTRING, because that seems to be what Access wants to take. I can't change the data type in the OLE DB Destination (the Access database), because it always changes back to DT_WSTRING, which I believe is an Access quirk.

    Any ideas on what I need to do to get around this? It's pretty urgent, since my last day at the company is tomorrow and no one else here knows SQL at all. 🙂

    -Charlotte

  • If all else fails, you can apply a type cast in a Derived Column component in your data flow to change the inbound DT_STR to an outbound DT_WSTR:

    Derived Column Name: UnicodeOutVal

    Derived Column:

    Expression: (DT_WSTR, )[SomeStringField]

    DataType: Unicode string [DT_WSTR]

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply