I am using asp with sql database
This is my stored procedure
set myconn=server.CreateObject("ADODB.connection")
Set cmd = Server.CreateObject("ADODB.Command")
Set cmd.ActiveConnection = myconn
cmd.CommandText = "Min_ProgId"
cmd.CommandType = adCmdStoredProc
cmd.Parameters.Append cmd.CreateParameter("RecDate",adchar,adParamInput)
cmd("RecDate") = ObjDate
set rst=cmd.Execute
Response.Write(rst("ProgId"))
and this is my Stored Prcedure
CREATE PROCEDURE dbo.Min_ProgId @RecDate char(15) AS
select ProgId from TblTotal Where convert(smalldatetime,Fromtime ,14)=(select Min(convert(smalldatetime,Fromtime ,114)) as Min_Fld from TblTotal Where ObjDate=@RecDate)
I need to pass the parameter ro stored procedure. but i get this error
"Error Type:
ADODB.Parameters (0x800A0E7C)
Parameter object is improperly defined. Inconsistent or incomplete information was provided."
The way i am calling stored procedure is what the microsoft has told. and also if i execute the stored procedure without passign a parameter to it , it works fine. but i need to pass a parameter RecDate to it, where is the problem, please help me?
Thank you