1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
Private Sub btn_modif_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_modif.Click
Dim Commande As New OleDbCommand
Dim Connexion As New OleDbConnection
'Définition des paramètres de connexion
If IsPostBack Then
Commande.Connection = Connexion
Commande.CommandType = CommandType.Text
Commande.CommandText = "UPDATE [tbl_users] SET [Password]='" & txt_old_mdp.Text & "',[Nom]='" & txt_nom.Text & "',[Prenom]='" & txt_prenom.Text & "',[Mail]='" & txt_mail.Text & "',[Date_Naissance]='" & txt_date_naissance.Text & "' WHERE [Pseudo]='" & txt_pseudo.Text & "';"
Connexion.ConnectionString = "Provider=microsoft.jet.oledb.4.0;Data Source=" & Page.MapPath("base/base.mdb") & ";"
'Ouvre la connexion
Connexion.Open()
Commande.ExecuteNonQuery()
lbl_majOK.Visible = True
panel_profil.Visible = True
Connexion.Close()
End If
End Sub |
Partager