I have DataTable that was loaded with a SqlDataReader query. After my DataTable is loaded, I do looping that I was insert data with a
DataTable
SqlDataReader
Solved! I just line code for reload datareader at starting index looping and refresh the datatable.
dt.reset() dtreader = cmddt.ExecuteReader() Dim dt As New System.Data.DataTable() dt.Load(dtreader)
It will be reload the datatable while database is changed.