1 2 3 4 5 6 7 8 9 10 11 12
|
Private Sub btnsup_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Btnsup.Click
If MessageBox.Show("Vous êtes sur le point de supprimer une feuille de match, continuer Cliquez sur oui !", "Supprimer une feuille de match", MessageBoxButtons.YesNo, MessageBoxIcon.Information) = Windows.Forms.DialogResult.Yes Then
Dim MyConnexion As OleDbConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data source=" & Application.StartupPath & "\gestionjoueurs.mdb;")
Dim Mycommand As OleDbCommand = MyConnexion.CreateCommand()
MyConnexion.Open()
If Me.TextBox1.Text = "Feuille de match équipe Première Seniors" Then
Mycommand.CommandText = "DELETE * FROM Archive_FeuilleMatch WHERE Id_Feuille =" & (strtoto1)
Dim myReader As OleDbDataReader = Mycommand.ExecuteReader()
Me.DataGrid1.Refresh()
End If |
Partager