Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > SP OUTPUT VALUE PROBLEM

Reply
Thread Tools

SP OUTPUT VALUE PROBLEM

 
 
Jeffrey K. Ericson
Guest
Posts: n/a
 
      06-06-2005
Shouldn't one of the parameters in the ASP code by output?

"Savas Ates" wrote:

> ERROR
> Error Type: ADODB.Command
> (0x800A0BB9) Arguments are of the wrong type, are out of acceptable range,
> or are
>
> line : .Parameters.Append .CreateParameter("@inparm", adInteger,
> adParamInput)
>
>
> MYPROC IS
>
> CREATE PROCEDURE st_myProc
>
> @inparm INT , @outparm INT OUTPUT
> AS
> SET @outparm=10
> GO
>
> ASP CODE WITH ADO
>
>
> set cmd=server.CreateObject ("ADODB.Command")
> Set cmd.ActiveConnection = baglantim
> cmd.CommandText = "st_myProc"
> cmd.CommandType = 4
> with cmd
> .Parameters.Append .CreateParameter("@inparm", adInteger, adParamInput)
> .Parameters.Append .CreateParameter("@inparm", adInteger, adParamInput)
> end with
>
> Set rs = cmd.Execute
> Dim i
> While Not rs.EOF
> Response.Write rs.Fields(i)&" "
> i = i + 1
>
> rs.MoveNext
>
> Wend
>
>
>

 
Reply With Quote
 
 
 
 
Savas Ates
Guest
Posts: n/a
 
      06-06-2005
ERROR
Error Type: ADODB.Command
(0x800A0BB9) Arguments are of the wrong type, are out of acceptable range,
or are

line : .Parameters.Append .CreateParameter("@inparm", adInteger,
adParamInput)


MYPROC IS

CREATE PROCEDURE st_myProc

@inparm INT , @outparm INT OUTPUT
AS
SET @outparm=10
GO

ASP CODE WITH ADO


set cmd=server.CreateObject ("ADODB.Command")
Set cmd.ActiveConnection = baglantim
cmd.CommandText = "st_myProc"
cmd.CommandType = 4
with cmd
.Parameters.Append .CreateParameter("@inparm", adInteger, adParamInput)
.Parameters.Append .CreateParameter("@inparm", adInteger, adParamInput)
end with

Set rs = cmd.Execute
Dim i
While Not rs.EOF
Response.Write rs.Fields(i)&" "
i = i + 1

rs.MoveNext

Wend


 
Reply With Quote
 
 
 
 
Rick Sawtell
Guest
Posts: n/a
 
      06-06-2005
> with cmd
> .Parameters.Append .CreateParameter("@inparm", adInteger,

adParamInput)
> .Parameters.Append .CreateParameter("@inparm", adInteger,

adParamInput)
> end with



You have two issues. The first is that you are trying to create the same
parameter twice. The second is that the second parameter needs to be
spec'ced as either an InputOutput or just an Output parm.


You need to change your second line here to something like:

.Parameters.Append.CreateParamenter("@outparm", adInteger,
adParamOutput)



Rick Sawtell


 
Reply With Quote
 
Savas Ates
Guest
Posts: n/a
 
      06-06-2005
actual with statement... what u mean?

Shouldn't one of the parameters in the ASP code by output? what is your
verb here ? how can i solve this promlem ?
with cmd
.Parameters.Append .CreateParameter ("@inparm", adInteger, adParamInput
, ,10)
.Parameters.Append .CreateParameter ("@outparm", adInteger,
adParamOutput)
end with



"Jeffrey K. Ericson" <(E-Mail Removed)>, haber
iletisinde şunları
yazdı:(E-Mail Removed)...
> Shouldn't one of the parameters in the ASP code by output?
>
> "Savas Ates" wrote:
>
>> ERROR
>> Error Type: ADODB.Command
>> (0x800A0BB9) Arguments are of the wrong type, are out of acceptable
>> range,
>> or are
>>
>> line : .Parameters.Append .CreateParameter("@inparm", adInteger,
>> adParamInput)
>>
>>
>> MYPROC IS
>>
>> CREATE PROCEDURE st_myProc
>>
>> @inparm INT , @outparm INT OUTPUT
>> AS
>> SET @outparm=10
>> GO
>>
>> ASP CODE WITH ADO
>>
>>
>> set cmd=server.CreateObject ("ADODB.Command")
>> Set cmd.ActiveConnection = baglantim
>> cmd.CommandText = "st_myProc"
>> cmd.CommandType = 4
>> with cmd
>> .Parameters.Append .CreateParameter("@inparm", adInteger,
>> adParamInput)
>> .Parameters.Append .CreateParameter("@inparm", adInteger,
>> adParamInput)
>> end with
>>
>> Set rs = cmd.Execute
>> Dim i
>> While Not rs.EOF
>> Response.Write rs.Fields(i)&" "
>> i = i + 1
>>
>> rs.MoveNext
>>
>> Wend
>>
>>
>>



 
Reply With Quote
 
Daniel Crichton
Guest
Posts: n/a
 
      06-06-2005
Savas wrote on Mon, 6 Jun 2005 18:24:53 +0300:

> ERROR
> Error Type: ADODB.Command
> (0x800A0BB9) Arguments are of the wrong type, are out of acceptable range,
> or are
>
> line : .Parameters.Append .CreateParameter("@inparm", adInteger,
> adParamInput)
>
> MYPROC IS
>
> CREATE PROCEDURE st_myProc
>
> @inparm INT , @outparm INT OUTPUT
> AS
> SET @outparm=10
> GO
>
> ASP CODE WITH ADO
>
> set cmd=server.CreateObject ("ADODB.Command")
> Set cmd.ActiveConnection = baglantim
> cmd.CommandText = "st_myProc"
> cmd.CommandType = 4
> with cmd
> .Parameters.Append .CreateParameter("@inparm", adInteger,
> adParamInput)
> .Parameters.Append .CreateParameter("@inparm", adInteger,
> adParamInput)


How about changing that 2nd one to

.Parameters.Append .CreateParameter("@outparm", adInteger,
adParamOutput)


Also, are you sure the adInteger, adParamInput, and adParamOutput constants
are defined in your ASP? If you're on IIS5 or higher I think they're
automatically included, but on IIS3 and IIS4 you need to include the
adovbs.inc that contains them.

> end with


> Set rs = cmd.Execute


You haven't set the value of the input parameter yet, why are you executing
the command object?

Dan


 
Reply With Quote
 
Savas Ates
Guest
Posts: n/a
 
      06-06-2005
my iis wersion windows xp's 5.0 or greater .. How can i solve it .. still it
doesnt work...

with cmd
..Parameters.Append .CreateParameter ("@inparm" , adInteger, adParamInput, ,
10)
.Parameters.Append .CreateParamenter ("@outparm", adInteger,adParamOutput)
end with







"Savas Ates" <(E-Mail Removed)>, haber iletisinde şunları
yazdı:(E-Mail Removed)...
> ERROR
> Error Type: ADODB.Command
> (0x800A0BB9) Arguments are of the wrong type, are out of acceptable range,
> or are
>
> line : .Parameters.Append .CreateParameter("@inparm", adInteger,
> adParamInput)
>
>
> MYPROC IS
>
> CREATE PROCEDURE st_myProc
>
> @inparm INT , @outparm INT OUTPUT
> AS
> SET @outparm=10
> GO
>
> ASP CODE WITH ADO
>
>
> set cmd=server.CreateObject ("ADODB.Command")
> Set cmd.ActiveConnection = baglantim
> cmd.CommandText = "st_myProc"
> cmd.CommandType = 4
> with cmd
> .Parameters.Append .CreateParameter("@inparm", adInteger, adParamInput)
> .Parameters.Append .CreateParameter("@inparm", adInteger, adParamInput)
> end with
>
> Set rs = cmd.Execute
> Dim i
> While Not rs.EOF
> Response.Write rs.Fields(i)&" "
> i = i + 1
>
> rs.MoveNext
>
> Wend
>
>



 
Reply With Quote
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      06-06-2005
http://www.aspfaq.com/show.asp?id=2112

Savas Ates wrote:
> my iis wersion windows xp's 5.0 or greater .. How can i solve it ..
> still it doesnt work...
>
> with cmd
> .Parameters.Append .CreateParameter ("@inparm" , adInteger,
> adParamInput, , 10)
> .Parameters.Append .CreateParamenter ("@outparm",
> adInteger,adParamOutput) end with
>
>
>


--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


 
Reply With Quote
 
William \(Bill\) Vaughn
Guest
Posts: n/a
 
      06-06-2005
Ok, what's "not working"? Does the code fail to compile, run, return the
OUTPUT parameter, return the same exception?

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com/blog/billva
www.betav.com
www.sqlreportingservices.net
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________


"Savas Ates" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> my iis wersion windows xp's 5.0 or greater .. How can i solve it .. still
> it doesnt work...
>
> with cmd
> .Parameters.Append .CreateParameter ("@inparm" , adInteger, adParamInput,
> , 10)
> .Parameters.Append .CreateParamenter ("@outparm", adInteger,adParamOutput)
> end with
>
>
>
>
>
>
>
> "Savas Ates" <(E-Mail Removed)>, haber iletisinde şunları
> yazdı:(E-Mail Removed)...
>> ERROR
>> Error Type: ADODB.Command
>> (0x800A0BB9) Arguments are of the wrong type, are out of acceptable
>> range, or are
>>
>> line : .Parameters.Append .CreateParameter("@inparm", adInteger,
>> adParamInput)
>>
>>
>> MYPROC IS
>>
>> CREATE PROCEDURE st_myProc
>>
>> @inparm INT , @outparm INT OUTPUT
>> AS
>> SET @outparm=10
>> GO
>>
>> ASP CODE WITH ADO
>>
>>
>> set cmd=server.CreateObject ("ADODB.Command")
>> Set cmd.ActiveConnection = baglantim
>> cmd.CommandText = "st_myProc"
>> cmd.CommandType = 4
>> with cmd
>> .Parameters.Append .CreateParameter("@inparm", adInteger,
>> adParamInput)
>> .Parameters.Append .CreateParameter("@inparm", adInteger,
>> adParamInput)
>> end with
>>
>> Set rs = cmd.Execute
>> Dim i
>> While Not rs.EOF
>> Response.Write rs.Fields(i)&" "
>> i = i + 1
>>
>> rs.MoveNext
>>
>> Wend
>>
>>

>
>



 
Reply With Quote
 
Daniel Crichton
Guest
Posts: n/a
 
      06-07-2005
Savas wrote on Mon, 6 Jun 2005 19:24:24 +0300:

> my iis wersion windows xp's 5.0 or greater .. How can i solve it .. still
> it doesnt work...
>
> with cmd
> .Parameters.Append .CreateParameter ("@inparm" , adInteger, adParamInput,
> , 10)
> .Parameters.Append .CreateParamenter ("@outparm",
> adInteger,adParamOutput) end with


Try

..Parameters.Append .CreateParameter ("@inparm" , 3, &H0001, , 10)

..Parameters.Append .CreateParameter ("@outparm", 3, &H0002)


as it appears that the constants adInteger, adParamInput, and adParamOutput
are not defined in your IIS installation. Follow the link given by Bob
Barrows for more info on how to add them if you rather constant names for
easier reading.

Dan


 
Reply With Quote
 
Robbe Morris [C# MVP]
Guest
Posts: n/a
 
      06-10-2005
http://www.eggheadcafe.com/articles/..._generator.asp

--
2004 and 2005 Microsoft MVP C#
Robbe Morris
http://www.masterado.net

Earn $$$ money answering .NET Framework
messageboard posts at EggHeadCafe.com.
http://www.eggheadcafe.com/forums/merit.asp



"Savas Ates" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> ERROR
> Error Type: ADODB.Command
> (0x800A0BB9) Arguments are of the wrong type, are out of acceptable range,
> or are
>
> line : .Parameters.Append .CreateParameter("@inparm", adInteger,
> adParamInput)
>
>
> MYPROC IS
>
> CREATE PROCEDURE st_myProc
>
> @inparm INT , @outparm INT OUTPUT
> AS
> SET @outparm=10
> GO
>
> ASP CODE WITH ADO
>
>
> set cmd=server.CreateObject ("ADODB.Command")
> Set cmd.ActiveConnection = baglantim
> cmd.CommandText = "st_myProc"
> cmd.CommandType = 4
> with cmd
> .Parameters.Append .CreateParameter("@inparm", adInteger, adParamInput)
> .Parameters.Append .CreateParameter("@inparm", adInteger, adParamInput)
> end with
>
> Set rs = cmd.Execute
> Dim i
> While Not rs.EOF
> Response.Write rs.Fields(i)&" "
> i = i + 1
>
> rs.MoveNext
>
> Wend
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange problem - page output contains output from another request Paul ASP .Net 1 04-10-2007 03:41 PM
xslt: how to use value from xml data as an attribute value in output html? =?UTF-8?b?5byg6Z+h5q2m?= XML 3 10-23-2006 02:31 PM
weird function output value problem Michel Rouzic C Programming 8 06-17-2005 09:44 AM
Easy way to output a default value if <xsl:value-of/> selection comes back empty? Michael Ahlers XML 1 07-12-2004 05:17 PM
Output / Debug window output bug? John Bentley ASP .Net 0 09-10-2003 07:38 AM



Advertisments