p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

asp_databases thread: Problem with Stored Procedure


Message #1 by "Vianneth Payan" <vpayan@p...> on Tue, 18 Dec 2001 22:07:39
this is my code:



	Set comando = Server.CreateObject("ADODB.Command")



	With comando

		.ActiveConnection = conexion

                ' below is line 86, here is the error:

		.CommandText = "TAL_ITD"  

		.CommandType = adCmdStoredProc



		.Parameter.Append .CreateParameter("@negocio", adNumeric, 

adParamInput , , negocio)

		.Parameter.Append .CreateParameter("@separador", 

adVarWChar, adParamInput , , ",")

		.Parameter.Append .CreateParameter("@salida", adVarWChar, 

adParamOutput , , referencia)

		.Execute , , adExecuteNoRecords



	End With

	Set comando=nothing



---------------

the error is:



ADODB.Command error '800a0bb9' 



La aplicación está usando argumentos incorrectos, o están fuera del 

intervalo permitido, o entran en conflicto con otros. 



/, line 86 



-------------

the test stored procedure is :



CREATE PROCEDURE TAL_ITD @negocio numeric, @separador varchar(2), @salida 

varchar(250) output  AS

if @negocio = '8110027632' /*SURENTA*/

	set @salida 

= '154741683171.12,2502.49192562,11.37,11.27801363535,11.30180388418'

else

	if @negocio = '8110111498' 

		set @salida 

= '254741683171.12,3502.49192562,11.37,11.27801363535,11.30180388428'

	else

		if @negocio = '8110270332' 

			set @salida 

= '354741683171.12,4502.49192562,11.37,11.27801363535,11.30180388438'

		else 

			set @salida 

= '454741683171.12,5502.49192562,11.37,11.27801363535,11.30180388448'





some idea?



help me please





thanks a lot.
Message #2 by "Austin, Jay" <jay@b...> on Tue, 18 Dec 2001 16:31:04 -0800
Have you included the adovbs.inc file anywhere in your page?  If not, 

then

VBScript has no way of know what adCmdStoredProc, adVarWChar, 

adParamInput,

adParamOutput means.  Normally I just include the followin constants.



Const adParamInput =3D &H0001

Const adCmdStoredProc =3D &H0004

Const adVarChar =3D 200

Const adParamReturnValue =3D &H0004

Const adParamOutput =3D &H0002

Const adInteger =3D 3

Const adLongVarChar =3D 201







-----Original Message-----

From: Vianneth Payan [mailto:vpayan@p...]

Sent: Tuesday, December 18, 2001 2:08 PM

To: ASP Databases

Subject: [asp_databases] Problem with Stored Procedure





this is my code:



	Set comando =3D Server.CreateObject("ADODB.Command")



	With comando

		.ActiveConnection =3D conexion

                ' below is line 86, here is the error:

		.CommandText =3D "TAL_ITD" 

		.CommandType =3D adCmdStoredProc



		.Parameter.Append .CreateParameter("@negocio", adNumeric,

adParamInput , , negocio)

		.Parameter.Append .CreateParameter("@separador",

adVarWChar, adParamInput , , ",")

		.Parameter.Append .CreateParameter("@salida", adVarWChar,

adParamOutput , , referencia)

		.Execute , , adExecuteNoRecords



	End With

	Set comando=3Dnothing



---------------

the error is:



ADODB.Command error '800a0bb9'



La aplicaci=F3n est=E1 usando argumentos incorrectos, o est=E1n fuera 

del

intervalo permitido, o entran en conflicto con otros.



/, line 86



-------------

the test stored procedure is :



CREATE PROCEDURE TAL_ITD @negocio numeric, @separador varchar(2), 

@salida

varchar(250) output  AS

if @negocio =3D '8110027632' /*SURENTA*/

	set @salida

=3D '154741683171.12,2502.49192562,11.37,11.27801363535,11.30180388418'

else

	if @negocio =3D '8110111498'

		set @salida

=3D '254741683171.12,3502.49192562,11.37,11.27801363535,11.30180388428'

	else

		if @negocio =3D '8110270332'

			set @salida

=3D '354741683171.12,4502.49192562,11.37,11.27801363535,11.30180388438'

		else

			set @salida

=3D '454741683171.12,5502.49192562,11.37,11.27801363535,11.30180388448'





some idea?



help me please





thanks a lot.




$subst('Email.Unsub').

Message #3 by "Ken Schaefer" <ken@a...> on Wed, 19 Dec 2001 19:58:59 +1100
www.adopenstatic.com/faq/800a0bb9.asp



Cheers

Ken



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

From: "Vianneth Payan" <vpayan@p...>

Subject: [asp_databases] Problem with Stored Procedure





: ---------------

: the error is:

:

: ADODB.Command error '800a0bb9'

:

: La aplicación está usando argumentos incorrectos, o están fuera del

: intervalo permitido, o entran en conflicto con otros.

:

: /, line 86

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




  Return to Index