Initializing empty datarow

hii,
How to initialize empty datarow in an assign activity

Hi,

If you wan to create DataRow variable for adding to DataTable, the following works.

dataRowVar = dt.NewRow

If you want to clear each items of the DataRow instance, the following will work.

dataRowVar.ItemArray = dataRowVar.Table.NewRow.itemArray

Regards,

I just want to create empty datatable and want to add some value from another datatable.
Will this 1st Syntax work?

I just want to create empty datarow and want to add some value from another datatable.
Will this 1st Syntax work?

I dont want to add any row in any datatable

You can use activity “Build Data Table” to create an empty data table. Remember to delete the sample data before saving it.

I want to create empty datarow variabke in an assign activity whixh should not belongs to any datatable initially

Are you sure you want to create empty Data row without any data table? It is like getting wool without sheep.

okay so how to declare empty datarow with datatable?

You can use activity “Add Data Row” as shown below to add empty row. The number of elements in ArrayRow should be same as the number of columns in your data table.

YoichiRobot Master gave another very good example in the previous post on how to get ArrayRow.

image