OLEDB Error code: 0x80040E21

2

Screenshot Hi, I'm executing multiple DMLs in OLEDB Command transformation using flat files source. Having connected the flat file connection manager and OLE DB connection managers and use derived column tranformation to help in getting all the columns from flat files aligned correctly with OLE DB columns, changing the data type, length and code-1252 . These errors occurred.

[OLE DB Command [60]] 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".

[OLE DB Command [60]] Error: There was an error with OLE DB Command.Inputs[OLE DB Command Input].Columns[upt_Gender] on OLE DB Command.Inputs[OLE DB Command Input]. The column status returned was: "The value could not be converted because of a potential loss of data.".

screenshot

sql-server
ssis
asked on Stack Overflow Jun 8, 2016 by G_force • edited Jun 8, 2016 by G_force

2 Answers

4

When you receive this type of error, it's usually a sign of incompatible data types/sizes. Excel sometimes automatically converts a character data to numeric data which could be causing a problem with the import.

I've just added a Data Conversion node and changed the type from Unicode Text stream to unicode string and it seems to be working.

answered on Stack Overflow Feb 13, 2017 by Parth Shahiwala • edited Feb 13, 2017 by codeepic
1

In your Destination ("OLE DB Command"), you are trying to pass a value to the upt_Gender column that does not fit the data type. Either it's the wrong kind of data, or it's a string that's too long for the column.

Either filter out data that will not fit the destination column, or change the destination column to accept the incoming data.

answered on Stack Overflow Jun 13, 2016 by Tab Alleman

User contributions licensed under CC BY-SA 3.0