0
I have a system in ASP Classico, and I’m trying to run a SQL Server process passing two parameters.
Originally I was only passing a date selected on a datepicker and it worked, now I want to pass an int value obtained in a combo (containing the values 1, 2 and 3).
The values are being sent through the function when I click on the button:
var data = document.getElementById("datepicker").value;
var homolog = document.getElementById("homolog").value;
Outros comandos...
xmlreq.open("GET", "carregahorarios.asp?data="+data + "&homolog=" + homolog, true);
The page loaded.Asp receives these values:
data = request.QueryString("data")
homolog = request.QueryString("homolog")
And creating the call for the trial:
Set cmd = Server.CreateObject("adodb.command")
With cmd
' Set up DB connection to use, set the type of SQL command
.ActiveConnection = conexao
.CommandType = adCmdStoredProc
.CommandText = "HorarioDisponivelHomolog"
.Parameters.Append .CreateParameter("@dataselec", adDBTimeStamp, adParamInput, 0, datanew&" 00:00:00")
.Parameters.Append .CreateParameter("@homolog", adInteger, adParamInput)
set rs = .Execute
End With
The parameter giving problem is this @Homolog.
When I click on the button that calls Procedure gives the following error message:
O procedimento ou a função 'HorarioDisponivelHomolog' espera o parâmetro '@homolog' que não foi fornecido.