ADO Parameters error
From: Patrick Russell (prussel_at_cfl.rr.com)
Date: 12/18/04
- Previous message: Ethan Hunt: "Err No. 80040e19(Object or Data matching......)"
- Next in thread: Ashok K Kumar: "Re: ADO Parameters error"
- Reply: Ashok K Kumar: "Re: ADO Parameters error"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 18 Dec 2004 16:08:04 GMT
Can anyone please explain why this would give me the following error?
ADODB.Parameters (0x800A0E7C)
Parameter object is improperly defined. Inconsistent or incomplete
information was provided.
The error occurs when I Append the new parameter object to the parameters
collection.
----------------------------------------------------------------------------
-------
--ASP Code
set oConn = Server.CreateObject("ADODB.Connection")
set cmdRtn = Server.CreateObject("ADODB.Command")
oConn.Open strConnect
with cmdRtn
cmdRtn.ActiveConnection = oConn
cmdRtn.CommandText = "sp_zz_test"
cmdRtn.CommandType = adCmdStoredProc
SET RTNVAL =
cmdRtn.CreateParameter("RETURN_VALUE",adVarChar,adParamReturnValue)
cmdRtn.Parameters.Append RTNVAL
cmdRtn.Execute ,,adExecuteNoRecords
rtnVal = .Parameters("RETURN_VALUE")
Response.Write rtnVal
end with
----------------------------------------------------------------------------
----------------------
--sProc Code
CREATE PROCEDURE sp_zz_test
AS
DECLARE @Rtn varchar(10)
SET @Rtn = 'All Done'
RETURN @Rtn
GO
-ENUM Values
Const adCmdStoredProc = &H0004
Const adVarChar = 200
Const adParamReturnValue = &H0004
Const adExecuteNoRecords = &H00000080
Thanks
Patrick
- Previous message: Ethan Hunt: "Err No. 80040e19(Object or Data matching......)"
- Next in thread: Ashok K Kumar: "Re: ADO Parameters error"
- Reply: Ashok K Kumar: "Re: ADO Parameters error"
- Messages sorted by: [ date ] [ thread ]