1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
con()
cmd = conn.CreateCommand
' cmd1 = conn.CreateCommand
cmd2 = conn.CreateCommand
If T1.Text <> "" And C1.Text <> "" And D1.Text <> "" And C2.Text <> "" Then
cmd.CommandText = "insert into entraineur values('" & C1.Text & " ','" & T1.Text & "')"
' cmd1.CommandText = "insert into dates_naissance(id_daten) values(" & C1.Text & " )"
cmd2.CommandText = "insert into nationalités(id_nationalité,nationalité_a) values('" & C1.Text & "','" & T3.Text & "')"
cmd.ExecuteNonQuery()
'cmd1.ExecuteNonQuery()
cmd2.ExecuteNonQuery()
MsgBox("Entraineur ajouté.")
Else
MsgBox("Veuillez remplir tous les champs.")
End If
deconn()
End Sub |
Partager