How to Update multiple rows in datatable

Hi,
I need to update multiple rows in DataTable…
I need to change the particular column value in all rows of the output comes from the Datatable.select query…

I am try with below statement. But its giving Error
Datatable.Select(“Name=‘Hemanth’”).ToList().ForEach(r =>r(“EmpId”)=“test”)

Anyone give suggestion for that problem…

Regards,

List.ForEach is a Sub so i does not return a value.
Therefore it cannot be used within an assign.
You will have to use an Invoke Code if you want to achieve it that way AND using the Linq Lambd Synthax from VB as under.

Datatable.Select(“Name=‘Hemanth’”).ToList().ForEach(Sub(row) row(“EmpId”)=“test”)

Using a normal for each activity would be less confusing tho…

Cheers

2 Likes

Hi, @Florent_Salendres

Thank you for Quick Reply…
Regards,

1 Like

pls share me the work file i updating datatable column value based on status condition