l'ajout fonctionne mais l'édition édite toujours la première ligne.
Set rs = rs.Open("select * from CarteAdmin where CodeID=""" & Text04 & """;") rs.Update rs![NomCarte] = Text01 rs![Valide] = Text06 rs.Update rs.MoveNext
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionrs.Open ("select * from CarteAdmin where CodeID=""" & Text04 & """;") rs.Update rs![NomCarte] = Text01 rs![Valide] = Text06 rs.Update rs.MoveNext
Erreur d'exécution '-2147217900 (80040e14)':
[MySQL][ODBC 5.1 Driver][mysqld-5.0.22]Unknown column 'CodeID' in 'where clause'
rs.Open ("select * from CarteAdmin where CodeID=""" & Text04 & """;")
Dim CodeID As String Dim NomCarte As String Dim Valide As String rs.Open "select * from CarteAdmin where CodeID ='" & Text04 & "' ", Con, adOpenDynamic, adLockOptimistic Con.Execute "update [CarteAdmin] set [NomCarte]='" & Text01 & "' where [CodeID]= '" & Text04 & "' " Con.Execute "update [CarteAdmin] set [Valide]='" & Text06 & "' where [CodeID]= '" & Text04 & "' " rs.Close
Erreur d'exécution '-2147217900 (80040e14)':
[MySQL][ODBC 5.1 Driver][mysqld-5.0.22]Unknown column 'CodeID' in 'where clause'
rs.Open "select * from CarteAdmin where CodeID ='" & Text04.text & "' ", Con, adOpenDynamic, adLockOptimistic