Showing posts with label errorcolumn. Show all posts
Showing posts with label errorcolumn. Show all posts

Wednesday, March 7, 2012

ErrorColumn field from Datasource Error Output

Hi,

The problem is, ErrorColumn contains ID. Is the following code reference safe ?
columnname = Me.ComponentMetaData.InputCollection.FindObjectByID(Row.ErrorColumn).Name

Is there any possibility for FindObjectByID to return NULL Reference in any case ?In many cases ErrorColumn is NULL.|||It contains ID, how do I translate it to Column Name ?
I have defined names in connection manager.|||I don't believe you can.|||Why I couldnt ?

That sucks|||

Fahad349 wrote:

Why I couldnt ?

That sucks

Because the column ID is the metadata ID of the column in the previous component, not the current component. So the ID being passed in isn't in the current component's metadata.

Indeed it isn't the best situation.

|||Dang on SQL Server team

Is there any harder way to do it ?|||

Fahad349 wrote:

Dang on SQL Server team

Is there any harder way to do it ?

You are welcome to submit a feature request: http://connect.microsoft.com/sqlserver/feedback

Errorcodes Ole DB destination error

I send my error output (errorcode , errorcolumn) of an Ole DB destination to another Ole DB destination. How do I know which errordescription belongs to an errorcode. For example errorcode "-1071607683"?

http://blogs.conchango.com/jamiethomson/archive/2005/08/08/1969.aspx

-Jamie

|||

Tnx! Is there also a way to do this with the error column name. So get the column name with the column number?

ErrorCode and ErrorColumn in Excel Destination

I am exporting records with errors to Excel using the Excel Destination tool. The ErrorColumn is a numeric. How do I find out which column it is?

If you want to do this manually (i.e. not programmatically), you can open the Advanced UI for the Excel Dest, and go to the "Input and Output Properties" tab. There, under "Excel Destination Input", you can look through the colums. As you click on each one, look for the "ID" property on the right that has the value you found in the ErrorColumn field of the error row.

Let me know if this helps or not.

Thanks,
Mark|||Hi

How would you do this programmatically? Ideally, I'd like to include the actual column name as another output column in my error destination table. Also, is it possible to obtain the error description as well as the ErrorCode (similar to what you might see in the Execution Results pane when debugging)?

Thanks

Rob|||Hi Rob

I want to do something similar but write out the column name to a table along with the data when rejected. Did you ever figure out how to do this?

Thanks

Marcus|||While it's fairly easy to add an ErrorDescription column on top of the ErrorCode, it's NOT so easy to add an ErrorColumnName on top of the ErrorColumn numeric ID value, because of all the ifs ands and buts that determine whether the column name is readily available or not. (For example, did the preceding component have synchronous or asynchronous outputs, and so forth.)

You can run your error output through a Script Component and try looping through the columns in its InputColumnCollection and VirtualInputColumnCollection looking for the ID value that you've got in the ErrorColumn column to see that this information is usually unavailable.

-Doug