Tu peux m'expliquer ta solution stp
Premièrement est-ce que ça marche ?
Si tu passes un SQL avec des paramètres, il faut définir ce que tu fais :
Code:
Sql= « Select, insert update »
Quels champs t’intéressent ?
Sur quel table
Appliques-tu un filtre where
Sont t’ils des paramètres @
Code:
Sql= "Select champ1,champ2 from MaTable Where Mochamp1=@MoParam1 and Mochamp2=@MoParam2;"
Ta solution ne marche pas chez moi.
Code:
1 2 3 4 5 6 7
| Dim cmd As New ADODB.Command
Dim rs As ADODB.Recordset
cmd.CommandType = adCmdStoredProc
cmd.CommandText = "sp_History"
cmd.Parameters.Append .CreateParameter("@IDAct", adVarChar, adParamInput,70 IDAc)
cmd.Parameters.Append .CreateParameter("@Date", adDate, adParamInput, 10,DateExe)
Set rs = cmd.Execute |