1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
Dim cnx As New OleDbConnection
Dim command = New OleDbCommand("update Abonnement set Abonnement.Num_abonnement='" & Cbxnumab.Text & "'" & ", Abonnement.Lib_abonnement='" & Txtlibab.Text & "'" & ", Abonnement.Date_debut_ab='" & Dates.Value & "'" & ", Abonnement.Date_fin_ab='" & Datef.Value & "'" & ", Abonnement.Montant_ab='" & Txtmontantab.Text & "'" & ", Abonnement.Num_frs='" & Txtnumfrs.Text & "'" & ", Abonnement.Nom_frs='" & Cbxfrs.Text & "'" & "where Num_abonnement='" & Cbxnumab.Text & "'", cnx)
Try
cnx.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source = C:\Documents and Settings\Administrateur.STANDARD\Mes documents\Projet Budget\Budget\Budget\Marches.mdb"
cnx.Open()
command.connection = cnx
command.executenonquery()
MsgBox("L'abonnement a été modifié avec succès", MsgBoxStyle.Information + MsgBoxStyle.OkOnly)
Catch ex As Exception
MsgBox(ex.Message)
Finally
If Not (cnx Is Nothing) Then
cnx.Close()
End If
End Try |
Partager