Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

erreur update recordset

1 réponse
Avatar
John Smith
Salut

Je recois ce message d'erreur.

sSQL = "SELECT Principale.Statut,"
sSQL = sSQL & " Principale.Projet"
sSQL = sSQL & " FROM Principale"
sSQL = sSQL & " WHERE (((Principale.Projet)=" &
Split(TreeView1.SelectedItem.Key, ";")(2) & "));"
valeur sSQL, 1

With recvaleur(1)
!Statut = 4
erreur a cette ligne --> .update
End With

1 réponse

Avatar
John Smith
Salut,

J'ai change ma facon de faire mon update


sCnn = "Provider=MSDASQL; DRIVER={MySQL ODBC 3.51 Driver}; SERVER=" &
db_server & "; DATABASE=" & db_name & "; UID=" & db_user & "; PWD=" &
db_pass & "; OPTION=" & db_option & "; PORT=" & db_port
Set cn = New ADODB.Connection
cn.Open sCnn
cn.Execute "UPDATE Principale SET Statut = 4 WHERE Projet =" &
Split(TreeView1.SelectedItem.Key, ";")(2)
cn.Close
Set cn = Nothing
"John Smith" wrote in message
news:r%XTf.2962$
Salut

Je recois ce message d'erreur.

sSQL = "SELECT Principale.Statut,"
sSQL = sSQL & " Principale.Projet"
sSQL = sSQL & " FROM Principale"
sSQL = sSQL & " WHERE (((Principale.Projet)=" &
Split(TreeView1.SelectedItem.Key, ";")(2) & "));"
valeur sSQL, 1

With recvaleur(1)
!Statut = 4
erreur a cette ligne --> .update
End With