Mes codes ne fonctionnent pas
Bonjour,
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| Dim con As New SqlConnection("Data Source=STLDB3\STLDB;Initial Catalog=VISITEURS;Integrated Security=True")
con.Open()
Dim dellete As New SqlCommand
Dim k As Integer
k = InputBox("Entrez le Numéro Carte à suprimer")
temptable.Rows[e.RowIndex].Delete()
MsgBox("entrer une valeur")
dellete.CommandText = "DELETE FROM visiteur WHERE Numéro_Carte=" & k & "'"
dellete.Connection = con
dellete.CommandType = CommandType.Text
dellete.ExecuteNonQuery()
MsgBox("Numéro suprimer")
Else
MsgBox("Rien suprimer")
End If
con.Close()
End Sub |