Edit a System.DataRow to add a new row in a DT

Many posts already talk about that, but not the way I’m trying to do it.

I’m using a buildDT activity to make a new DT (DT01) with 4 columns and nothing else.

I initialized my DataRow (DT01R like that : DT01.NewRow()

Now I’m trying to edit the content of DT01R with an multiple assign activity :
DT01R(0) = “Hello”
DT01R(1) = “word”
DT01R(2) = “I am”
DT01R(3) = “John Doe”

But it’s not working.
An error is triggered :

  • Can’t assign “word” to DT01R.item(1)

Any help will be very appreciate.

@anon52976114

Is you second column of type string or is it different?

cheers

good catch … it was an integer.
Because of the exemple data in the build activity.

thanks, it’s working now

1 Like

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