1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
Dim i As Integer
' id commence à 2 donc pour que l'id de ma table commence à 1
i = id - 1
Set con = New ADODB.Connection
'Enfin pour terminer, nous allons établir la connexion au serveur MySQL.
con.CursorLocation = adUseServer
con.Open "DRIVER={MySQL ODBC 3.51 Driver};SERVER=" & servdb & ";DATABASE=" & nomdb & ";USER=" & logindb & ";PASSWORD=" & pwddb & ";OPTION=" & optdb & ""
'traitement
Dim rst As ADODB.Recordset
Set rst = New ADODB.Recordset
'price est un paramètre de la procédure
rst.Open "UPDATE Appli SET LPW" + price + " WHERE ID = " + i, con
con.Close |
Partager