| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 
 |     Private Sub Button3_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        On Error Resume Next
        connecte()
        For i As Integer = 0 To DataGridView1.Rows.Count - 1
 
 
 
            cmd = New OleDb.OleDbCommand("insert into [Client] values(""" & DataGridView1.Rows(i).Cells(0).Value & """,""" & DataGridView1.Rows(i).Cells(1).Value & """,""" & DataGridView1.Rows(i).Cells(2).Value & """,""" & DataGridView1.Rows(i).Cells(3).Value & """,""" & DataGridView1.Rows(i).Cells(4).Value & """,""" & DataGridView1.Rows(i).Cells(5).Value & """,""" & DataGridView1.Rows(i).Cells(6).Value & """,""" & DataGridView1.Rows(i).Cells(7).Value & """)", con)
            cmd.ExecuteNonQuery()
 
 
        Next
 
        deconnecte()
 
        MsgBox("Opération terminée avec succès")
 
    End Sub | 
Partager