C
c676228
Hi everyone,
I have a sql store procedure which accept three parameters and for the first
time I call this store procedure, it seems fine, but when I call it second
time in the program with the same code, it seems it memorizes the old three
parameters I appended the first time and it gives me the error message as
specified in the subject line. I just don't know how to avoid it.
I need to call in the program for multiple times, any suggestions I should do?
I just cannot think of a good way to do it.
Thank you.
Betty
cmdTemp.CommandText = "RecordTxn"
cmdTemp.CommandType = adCmdStoredProc
Set paramOrderID=cmdTemp.CreateParameter("@orderID", adVarChar,
adParamInput,26)
Response.Write order_id
'Response.End
paramOrderID.value=order_id
cmdTemp.Parameters.Append paramOrderID
Set paramNo=cmdTemp.CreateParameter("@no", adChar, adParamInput,26)
paramNo.value=trim(Request("number"))
cmdTemp.Parameters.Append paramNo
Set paramExpDate=cmdTemp.CreateParameter("@date", adChar, adParamInput,4)
paramDate.value=str_date
cmdTemp.parameters.Append paramDate
cmdTemp.Execute
I have a sql store procedure which accept three parameters and for the first
time I call this store procedure, it seems fine, but when I call it second
time in the program with the same code, it seems it memorizes the old three
parameters I appended the first time and it gives me the error message as
specified in the subject line. I just don't know how to avoid it.
I need to call in the program for multiple times, any suggestions I should do?
I just cannot think of a good way to do it.
Thank you.
Betty
cmdTemp.CommandText = "RecordTxn"
cmdTemp.CommandType = adCmdStoredProc
Set paramOrderID=cmdTemp.CreateParameter("@orderID", adVarChar,
adParamInput,26)
Response.Write order_id
'Response.End
paramOrderID.value=order_id
cmdTemp.Parameters.Append paramOrderID
Set paramNo=cmdTemp.CreateParameter("@no", adChar, adParamInput,26)
paramNo.value=trim(Request("number"))
cmdTemp.Parameters.Append paramNo
Set paramExpDate=cmdTemp.CreateParameter("@date", adChar, adParamInput,4)
paramDate.value=str_date
cmdTemp.parameters.Append paramDate
cmdTemp.Execute