Add Data Row Problem - Trying to add a simple INT32 To A data table

Well,

I have a problem understanding the behaviour of Add data row activity.

I just need to do this:

dt_One has many columns: First column, lets call it: columnOne has a number in it, but is mapped as a string and I need to have this column mapped as an int32 so I do the following

  1. For each row in dt_One
  2. Assing: ActualNumber = Convert.ToInt32(CurrentRow.Item(0).ToString) - This takes data in first column and convert it to Int 32 per row.

The problem:

Step 3: Inside the for each I want to add to dt_Two just one column with the assigned Int32.

I can not make it to work, nor with array row nor with data row… It says that int 32 can not be converted to object. Im kinda desperate with how this activity works since my dt_Two is prebuilt with only one column of Int32 Type

Can someone help me?

image

maybe some details are more to clear. was the following tried

Add DataRow Activity | RowArray= new Object(){YourIntVar}

Or

Assgin Activity
newRow = dt2.newRow

Assign Activity
newRow(ColNameOrIndex) = yourIntVar

Add DataRow | DataRow=newRow

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.