could someone help with this please
I have a stored procedure (syntax check is OK)
CREATE PROCEDURE ValidateAdmin1
@ADMIN char(250),
@RETID int OUTPUT
AS
SELECT @RETID= ID FROM [ADMIN] WHERE [adminid]='@ADMIN'
GO
The ASP code to access this is as follows
----------------------------
DIM cmd
Set cmd = Server.CreateObject("ADODB.Command")
set cmd.ActiveConnection = conn
cmd.CommandText = "ValidateAdmin1"
cmd.CommandType = adCmdStoredProc
SET paramID=cmd.CreateParameter("@ADMIN", adVarChar, adParamInput)
paramID.value=request.form("AdminID")
cmd.Parameters.Append paramID <======= error line
SET paramID=cmd.CreateParameter("@RETID", adInteger, adParamOutput)
cmd.Parameters.Append paramRETURN
cmd.execute
DIM intNumber
intNumber=cmd.Parameters("@RETID")
SET cmd=NOTHING
----------------
i am getting an error on line specified above
ADODB.Parameters (0x800A0E7C)
Parameter object is improperly defined. Inconsistent or incomplete information was provided.
I have tried lots of ways of trying to do this!!
I would appreciate some help please
michael
I have a stored procedure (syntax check is OK)
CREATE PROCEDURE ValidateAdmin1
@ADMIN char(250),
@RETID int OUTPUT
AS
SELECT @RETID= ID FROM [ADMIN] WHERE [adminid]='@ADMIN'
GO
The ASP code to access this is as follows
----------------------------
DIM cmd
Set cmd = Server.CreateObject("ADODB.Command")
set cmd.ActiveConnection = conn
cmd.CommandText = "ValidateAdmin1"
cmd.CommandType = adCmdStoredProc
SET paramID=cmd.CreateParameter("@ADMIN", adVarChar, adParamInput)
paramID.value=request.form("AdminID")
cmd.Parameters.Append paramID <======= error line
SET paramID=cmd.CreateParameter("@RETID", adInteger, adParamOutput)
cmd.Parameters.Append paramRETURN
cmd.execute
DIM intNumber
intNumber=cmd.Parameters("@RETID")
SET cmd=NOTHING
----------------
i am getting an error on line specified above
ADODB.Parameters (0x800A0E7C)
Parameter object is improperly defined. Inconsistent or incomplete information was provided.
I have tried lots of ways of trying to do this!!
I would appreciate some help please
michael