Dim _tableBackLogs As System.Data.DataTable
Do While i - 2 > 0
_tableBackLogs = Global.DataAccess.GetDataTable("SELECT SubjectID,SubjectName,Grade FROM SubjectPI WHERE RegNo='" & CInt(HttpContext.Current.Session("userName")) & "' AND Status='Fail' AND Semester='" & i - 2 & "'")
i = i - 2
Loop
这样做会替换DataTable
. 我想保留以前的数据,即我希望将新行添加到 DataTable 中而不替换以前的行。