January 6, 2005 at 1:16 pm
Hi Everyone,
I'm getting this weird error message in classic ASP:
Microsoft OLE DB Provider for SQL Server error '80040e14'
Formal parameter '@monthselected' was defined as OUTPUT but the actual parameter not declared OUTPUT.
/sos2005/incUnitTier2.asp, line 712
This is how I'm calling the stored procedure from ASP:
cmd.CommandText = "asp_getdivisionbasic2infoTiers" cmd.Parameters.Append (cmd.CreateParameter ("RETURN_VALUE", 3, 4, 0, NULL )) cmd.Parameters.Append (cmd.CreateParameter ("@divisionid", 3, 1, 0, divisionID ))
cmd.Parameters.Append (cmd.CreateParameter ("@monthselected", 17, 1, 0, monthSelected ))
cmd.Parameters.Append (cmd.CreateParameter ("@syndications", 3, 3, 0, Syndications ))
cmd.Parameters.Append (cmd.CreateParameter ("@RBS", 3, 3, 0, RBS )) cmd.execute , , 128
This is how I'm setting up the stored procedure:
CREATE PROCEDURE asp_getdivisionbasic2infoTIERS
(
@divisionid TINYINT,
@monthselected TINYINT,
@targetmarketcloses INT = NULL OUTPUT,
@leases INT = NULL OUTPUT /* ID =12*/,
@newdepositactualrevenue INT = NULL OUTPUT,
/* Tier Two */
@international INT = NULL OUTPUT,
@derivatives INT = NULL OUTPUT,
@onetimefees INT = NULL OUTPUT,
@syndications INT = NULL OUTPUT,
@RBS INT = NULL OUTPUT,
/* Tier Three */
@cashmgmt INT = NULL OUTPUT,
@investmentmgmt INT = NULL OUTPUT,
@commercialcard INT = NULL OUTPUT,
@insurance INT = NULL OUTPUT /* ID = 11 */,
@merchantsvcs INT = NULL OUTPUT,
@privatebanking INT = NULL OUTPUT,
@retailproduct INT = NULL OUTPUT /* ID = 2 */
)
AS
code goes here.
You'll notice that @monthselected is not declared as an output parameter and not only that I run the same type of procedure before and it works fine. I have no idea what's going again.
Please help!!!
January 6, 2005 at 2:30 pm
Pretty much self-describing
cmd.Parameters.Append (cmd.CreateParameter ("@monthselected", 17, 1, 0, monthSelected )) is missing OUTPUT.
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
January 6, 2005 at 2:44 pm
Hmmm I tried his code and it works for me... can't see the problem from here. The only thing I can think of is that you may have 2 versions of the stored proc and you're not using the one the web user is using...
January 7, 2005 at 3:47 am
Oops, sorry, I'm that much used to something like this
.Parameters.Append .CreateParameter("@sql", adVarChar, adParamInput, 4000)
that I didn't see that you used the numeric equivalent. Sorry, if that has lead to confusion.
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply