If DataGridView10.Rows.Count > 0 Then
'If Not DataGridView10.Rows(i).IsNewRow() Then
For i = 0 To DataGridView10.Rows.Count - 1
If Not DataGridView10.Rows(i).IsNewRow() Then
Dim row0 As String = DataGridView10.Rows(i).Cells(0).Value.ToString
Dim row1 As String = DataGridView10.Rows(i).Cells(1).Value.ToString
Dim row2 As String = DataGridView10.Rows(i).Cells(2).Value.ToString
Dim row3 As String = DataGridView10.Rows(i).Cells(3).Value.ToString
Dim row4 As String = DataGridView10.Rows(i).Cells(4).Value.ToString
Dim row6 As String = DataGridView10.Rows(i).Cells(6).Value.ToString
Dim row7 As String = DataGridView10.Rows(i).Cells(7).Value.ToString
Dim row8 As String = DataGridView10.Rows(i).Cells(8).Value.ToString
gsql = "insert into orders(or_id,or_date,emp_id,sup_id,pro_id,or_qty,or_price,or_total) VALUES ("
gsql += "'" & row0 & " ',"
gsql += "'" & row1 & " ',"
gsql += "'" & row2 & " ',"
gsql += "'" & row3 & " ',"
gsql += "'" & row4 & " ',"
gsql += "'" & row6 & " ',"
gsql += "'" & row7 & " ',"
gsql += "'" & row8 & "')"
With cmd
.CommandType = CommandType.Text
.CommandText = gsql
.Connection = cnn
.ExecuteNonQuery()
End With
End If
Next
'End If
End If