Assign: There is no row at position 1

Hii all,

I am getting an error on line “in_Datatable.Rows(in_Datatable.Rows.Count)(ColumnName).ToString” when fetching row count

datatable below


how to get through this error

Thanks and Regards,
Supriya

Hi,

Index in vb.net is zero-based, so can you try to write as the following.

in_Datatable.Rows(in_Datatable.Rows.Count-1)(ColumnName).ToString

Regards,

1 Like

Hi,

Same error is shown.
Can I know steps of how to enter the data in a row of a column only if the column name matches a key

Initially all the rows are empty

Thanks and Regards,
Supriya