I have a stored procedure which accepts a parameter and returns a Recordset. It is:
CREATE PROCEDURE procstate
@ctry varchar(50)
AS
Select state from state WHERE country= @ctry
I have checked this using Query Analyzer and it worked fine. Now i am using the Command Object parameter to run it as follows:
cmd.CommandType = 4
cmd.CommandText = "procstate"
Set paramId = cmd.CreateParameter("ctry", adVarChar,adParamInput,50,Request.Form("ddlCountry")
cmd.Parameters.Append paramId
Set rs = cmd.Execute
But the Stored Procedure doesnot work. Any suggestions?
CREATE PROCEDURE procstate
@ctry varchar(50)
AS
Select state from state WHERE country= @ctry
I have checked this using Query Analyzer and it worked fine. Now i am using the Command Object parameter to run it as follows:
cmd.CommandType = 4
cmd.CommandText = "procstate"
Set paramId = cmd.CreateParameter("ctry", adVarChar,adParamInput,50,Request.Form("ddlCountry")
cmd.Parameters.Append paramId
Set rs = cmd.Execute
But the Stored Procedure doesnot work. Any suggestions?