Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SP fetching Resultset and output parameter

Status
Not open for further replies.

shuklix

Programmer
Jul 15, 2003
21
0
0
AU
HI All,


I am trying to fetech 2 int, 1 decimal and one resultset from a Stored Proc.


here is my codlet
========================================================
set Command2 = Server.CreateObject("ADODB.Command")
Command2.ActiveConnection = ACBD
Command2.CommandText = "report"
Command2.Parameters.Append Command2.CreateParameter("@RETURN_VALUE", 3, 4,4)
Command2.Parameters.Append Command2.CreateParameter("@monthcount", 3, 2,4)
Command2.Parameters.Append Command2.CreateParameter("@monthavg", 14, 2,4)
Command2.Parameters("@monthavg").Precision = 10
Command2.Parameters.Append Command2.CreateParameter("@mincount", 3, 2,4)
Command2.Parameters.Append Command2.CreateParameter("@month", 3, 1,4,Command2__month)
Command2.Parameters.Append Command2.CreateParameter("@year", 3, 1,4,Command2__year)
Command2.Parameters.Append Command2.CreateParameter("@dataid", 3, 1,4,Command2__dataid)
Command2.CommandType = 4
Command2.CommandTimeout = 0
Command2.Prepared = true

rs = Command2.Execute
^^^^^^^^^^^^^^^^^^^^^^

===========================================================

My problem is that when I get the resultset I do not get the values of the output parameters and if I remove the result set I get the values of the output variables.


In My code, If I replace the last line "rs = Command2.Execute" with
"Command2.Execute" I get the values of my output variables of my SP.

Can U please point where I am going wrong ?

TIA,
Saurabh Shukla

 
I read the 2 links. Still can not see, where I am going wrong ???

Saurabh
 
My -hidden- suggestion is that you try to launch your SP in another way. I always use option 2 (2nd article).


br
Gerard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top