November 5, 2013 at 6:28 am
I have a very simple package I'm experimenting with error handling on, which takes a flat file (CSV) and then inserts it into a table in SQL Server.
With the Flat File Source I've redirected the rows to a script component to get an error description and the data viewer shows the error descriptions are column specific to the deliberate 'duff' test data I've put in (Strings exceeding a certain length, text in integer columns etc.), which I'm happy with.
However, when I do something similar with the redirected rows from my OLE DB Destination the error raised is very generic and the same for all rows that fail (The destination source data access mode has been set to "Table or View" so rows that pass validation do get inserted into the table)
ErrorCode: -1071607683
ErrorDesc: The data value violates integrity constraints.
The test table has a PK, a FK and Check constraints and similar to the flat file error handling, I've deliberately added data which violates each of these to check that it will throw an error.
Is it possible to get something more specific as an error description to say why that certain row has not been inserted? So if for example its a duplicate row that violates the PK, the description would say as much?
My script component very simple and takes the redirected error code from the row and translates to a description:
public override void Input0_ProcessInputRow(Input0Buffer Row)
{
Row.ErrorDescription = this.ComponentMetaData.GetErrorDescription(Row.ErrorCode);
}
Any suggestions or alternatives methods welcome.
November 7, 2013 at 12:29 am
Also, you can design error handling like this:
Raunak J
November 7, 2013 at 2:15 am
Raunak Jhawar (11/7/2013)
Also, you can design error handling like this:
Thanks Raunak, I've only had time to quickly flick through this, but I think this may go some way to achieving what I want. Will have to digest it fully when I have some more time.
Ta
Dohsan
November 7, 2013 at 2:17 am
Shout out loud if you need any further info!
Raunak J
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply