How to refresh the datatable after updated value with SqlCommand statement?

前端 未结 1 1826
迷失自我
迷失自我 2021-01-27 17:16

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

相关标签:
1条回答
  • 2021-01-27 17:59

    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.

    0 讨论(0)
提交回复
热议问题