Hi All
I wonder if anyone can help. I have been using the Wrox ASP3 beginners book to create a search page looking up data within an Access 2000 database.
I have been trying to pass 2 parameters into a query but have had no success. I can pass one parameter with no problems. Can anyone show what I am doing wrong?
My code is:
Code:
strlname = request.Form("lname")
strSetCode = Request.Cookies("xyz")("Setcode")
Set objComm = Server.CreateObject("ADODB.Command")
objComm.ActiveConnection = strConnect
objComm.CommandText = "qryUsearch"
objComm.CommandType = adCmdStoredProc
Set objParam1 = objComm.CreateParameter("Required SetCodeP", adVarChar, adParamInput, 50)
objComm.Parameters.Append(objParam1)
objParam1.value = strSetCode
Set objParam2 = objComm.CreateParameter("Required lnameP", adVarChar, adParamInput, 50)
objComm.Parameters.Append(objParam2)
objParam2 = strlname
Set objRS = objComm.Execute
...Its probably simple but I am on a learning curve.
Many thanks in advance all!
Rich