salut

j'eesaye ce code mais il ne marche pas

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
 
Set rs.ActiveConnection = con
rs.Open " Select * from acteur  where  ((nom ='" & boxnom.Value & "') and  (prenom ='" & boxprenom.Value & "')) "
 
'Traitement
If rs.EOF Then '(si pas d'enregistrements)
 
 
'insertion
sql = " insert into acteur (nom , prenom,salaire )  Values ('" & boxnom.Value & "','" & boxprenom.Value & "','" & boxprenom.Value & "')"
con.Execute sql
 
Else '(au moins un enregistrement)
 
sql2 = " UPDATE acteur SET salaire  ='" & boxsalaire.Value & "'    where  ((nom ='" & boxnom.Value & "') and  (prenom ='" & boxprenom.Value & "')) "
 
 
con.Execute sql2
End If
rs.Close
Set rs = Nothing
con.Close
Set con = Nothing

merci d'avance