|
 |
asp_databases thread: Re: Formal parameter was defined as OUTPUT but the actual parameter not declared OUTPUT
Message #1 by "Beric Holt" <buzzrick@h...> on Tue, 23 Oct 2001 22:59:19
|
|
> Hi,
> I'm trying to call a StoredProcedure within ASP, but I'm getting a
> stange error. I've written dozens of similar Stored Procedures, but
none
> with as many parameters as this one. I tested this stored procedure in
> SQL 7 and it works fine, but when I attempt to call it from ASP code it
> gives me an error. When I remove ANY 4 parameters (i.e. @Description,
> @CallResolution, @CallReq, @Verified) leaving only 20 parameters
including
> the "output" parameter, it works just fine. Also, if I remove just the
> @verified parameter then it will give the same error to the prior
> parameter @CallReq.
> Is there a maximum number of parameters you are allowed to use when
making
> a call to a StoredProcedure from ASP?
>
I'm getting the same problem. It seems to be something to do with not
using the last input parameter, and SQL then assumes that it is an output
parameter.
Moving that parameter up the list doesn't seem to help either - I just get
a different error message: "Operand type clash: float is incompatible with
text"
Any ideas anyone?
Cheers
Buzzrick
Message #2 by "Tomm Matthis" <matthis@b...> on Wed, 24 Oct 2001 09:09:48 -0400
|
|
I'm assuming that you're using an ado command object here. (I know, don't
assume....<grin>)
But make sure that you are declaring the parameters and appending them in the
same order as they are declared in the sproc. Also add SET NO COUNT OFF at the
top of sproc and SET NOCOUNT ON at the bottom to see if that helps.
Also, check for "stoopid" stuff, like the full declaration statement for the
.createparameter. I spent two hours once 'cause I overlooked a misplaced
comma in one of these one time..... coder emptor and all that...
<grin>
-- Tomm
> -----Original Message-----
> From: Beric Holt [mailto:buzzrick@h...]
> Sent: Tuesday, October 23, 2001 10:59 PM
> To: ASP Databases
> Subject: [asp_databases] Re: Formal parameter was defined as OUTPUT but
> the actual parameter not declared OUTPUT
>
>
> > Hi,
> > I'm trying to call a StoredProcedure within ASP, but I'm getting a
> > stange error. I've written dozens of similar Stored Procedures, but
> none
> > with as many parameters as this one. I tested this stored procedure in
> > SQL 7 and it works fine, but when I attempt to call it from ASP code it
> > gives me an error. When I remove ANY 4 parameters (i.e. @Description,
> > @CallResolution, @CallReq, @Verified) leaving only 20 parameters
> including
> > the "output" parameter, it works just fine. Also, if I remove just the
> > @verified parameter then it will give the same error to the prior
> > parameter @CallReq.
> > Is there a maximum number of parameters you are allowed to use when
> making
> > a call to a StoredProcedure from ASP?
> >
>
> I'm getting the same problem. It seems to be something to do with not
> using the last input parameter, and SQL then assumes that it is an output
> parameter.
>
> Moving that parameter up the list doesn't seem to help either - I just get
> a different error message: "Operand type clash: float is incompatible with
> text"
>
> Any ideas anyone?
>
> Cheers
> Buzzrick
|
|
 |