Dim updateExamSql As String = "UPDATE Exams SET " & _ "Obj = " & CInt(dgv.Rows(e.RowIndex).Cells(2).Value) & ", " & _ "Comp = " & CInt(dgv.Rows(e.RowIndex).Cells(3).Value) & ", " & _ "Eng = " & CInt(dgv.Rows(e.RowIndex).Cells(4).Value) & ", " & _ "Sarufi = " & CInt(dgv.Rows(e.RowIndex).Cells(5).Value) & ", " & _ "Insha = " & CInt(dgv.Rows(e.RowIndex).Cells(6).Value) & ", " & _ "Kisw = " & CInt(dgv.Rows(e.RowIndex).Cells(7).Value) & ", " & _ "Maths = " & CInt(dgv.Rows(e.RowIndex).Cells(8).Value) & ", " & _ "Sci = " & CInt(dgv.Rows(e.RowIndex).Cells(9).Value) & ", " & _ "SS = " & CInt(dgv.Rows(e.RowIndex).Cells(10).Value) & ", " & _ "CRE = " & CInt(dgv.Rows(e.RowIndex).Cells(11).Value) & ", " & _ "SSRE = " & CInt(dgv.Rows(e.RowIndex).Cells(12).Value) & ", " & _ "Score = " & CInt(dgv.Rows(e.RowIndex).Cells(13).Value) & ", " & _ "Grade = '" & CStr(dgv.Rows(e.RowIndex).Cells(14).Value) & "' " & _ "WHERE ExamCode = " & CInt(dgv.Rows(e.RowIndex).Cells(15).Value) & " " Dim cmd = New OleDb.OleDbCommand(updateExamSql, cn) cmd.ExecuteNonQuery() updates += 1 MsgBox(updates.ToString + " Rows Updated", vbInformation) cmd.Dispose()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)