1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
Dim n As Integer = Val(txtNumero.Text)
Dim Savecommand As New OleDb.OleDbCommand
Dim Connectionstring As String = _
"Provider=Microsoft.Jet.OLEDB.4.0; Data Source =" & _
Application.StartupPath & "\db.mdb"
Dim newconnection As New OleDbConnection(Connectionstring)
Savecommand.Connection = newconnection
Savecommand.CommandType = CommandType.Text
Savecommand.CommandText = "UPDATE TableA SET n° = '" & Trim(txtNuEleve.Text) & _
"'_ , classe = '" & Trim(txtClasse.Text) & "' , prenom = '" & Trim(txtPrenom.Text) & _
"' , nom = '" & Trim(txtNom.Text) & "' , note= '" & Trim(txtScore.Text) & "' WHERE numero ='n'"
newconnection.Open()
Savecommand.ExecuteNonQuery()
newconnection.Close()
messagebox.show("Enregisstrement suvegardé avec succès") |
Partager