Rc.Open "UPDATE Affectations SET (affectation = " & TxChange.Text & ") Where (id_affectation = " & CbAffectation1.Column(0) & ")", Ct, adOpenDynamic, adLockBatchOptimistic
si le champs affectation et de type littéral ajouter des apostrophes en début et fin de " & TxChange.Text & "
Rc.Open "UPDATE Affectations SET (affectation = '" & TxChange.Text & "') Where (id_affectation = " & CbAffectation1.Column(0) & ")", Ct, adOpenDynamic, adLockBatchOptimistic
les parenthèses me semble superflues
Rc.Open "UPDATE Affectations SET affectation = '" & TxChange.Text & "' Where id_affectation = " & CbAffectation1.Column(0), Ct, adOpenDynamic, adLockBatchOptimistic
Partager