Private Sub ts_submit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ts_submit.Click
Dim sql As String
'sql = "insert into activityreport1 values(" & dtp.Value.ToString("dd-MMM-yyyy") & ",'" & dgv1.Rows(0).Cells(1).Value & "','" & dgv1.Rows(0).Cells(2).Value & "','" & dgv1.Rows(0).Cells(3).Value & "','" & dgv1.Rows(0).Cells(4).Value & "','" & dgv1.Rows(0).Cells(5).Value & "','" & dgv1.Rows(0).Cells(6).Value & "','" & dgv1.Rows(0).Cells(7).Value & "','" & dgv1.Rows(0).Cells(8).Value & "','" & dgv1.Rows(0).Cells(9).Value & "','','','','','','','''','','')"
sql = "insert into activityreports1 values('','" & dgv1.Rows(0).Cells(1).Value & "', '" & dgv1.Rows(0).Cells(2).Value & "', '" & dgv1.Rows(0).Cells(3).Value & "', '" & dgv1.Rows(0).Cells(4).Value & "', '" & dgv1.Rows(0).Cells(5).Value & "', '" & dgv1.Rows(0).Cells(6).Value & "', '" & dgv1.Rows(0).Cells(7).Value & "', '" & dgv1.Rows(0).Cells(8).Value & "', '" & dgv1.Rows(0).Cells(9).Value & "', '" & dgv1.Rows(0).Cells(10).Value & "', '" & dgv1.Rows(0).Cells(11).Value & "', '" & dgv1.Rows(0).Cells(12).Value & "', '" & dgv1.Rows(0).Cells(13).Value & "', '" & dgv1.Rows(0).Cells(14).Value & "', '" & dgv1.Rows(0).Cells(15).Value & "', '" & dgv1.Rows(0).Cells(16).Value & "', '" & dgv1.Rows(0).Cells(17).Value & "', '" & dgv1.Rows(0).Cells(18).Value & "', '" & dgv1.Rows(0).Cells(19).Value & "')"
Dim cmd As New OracleCommand(sql, conn)
cmd.CommandType = CommandType.Text
Dim r As Integer = cmd.ExecuteNonQuery
If r = 0 Then
MsgBox("Failed")
Else
MsgBox("Success")
dgv1.Rows(0).Cells(17).Value = "submitted"
End If
End Sub