Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem using a sql server procedure - pls advise

Status
Not open for further replies.

keepset

Programmer
Jul 18, 2008
1
GB
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top