473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

stored procedure problem

CREATE PROCEDURE zzz @userid numeric(18),@polim numeric(18) OUTPUT
AS
select * from users where userid=@userid

select @polim= count(*) from users
return (@polim)
GO

*********************
how can i gain the value of @polim in asp

in asp

set rs=baglantim.execute ("declare @sa as int exec zzz @userid='21',
@polim=@sa OUTPUT")

response.write rs("@sa")
like this (only i tried i dont know how can i gain the value it with execute
method....)
Jul 19 '05 #1
2 1172
1. a RETURN value and OUTPUT value are differenct.
2. You can only RETURN an integer value.
3. Your SP RETURNS and OUTPUTS the count value.

To see how to use them from ASP, read

http://www.adopenstatic.com/faq/reco...ternatives.asp
and http://www.adopenstatic.com/faq/SprocsAndParameters.asp

--
Roji. P. Thomas
Net Asset Management
https://www.netassetmanagement.com
"Savas Ates" <sa***@indexinteractive.com> wrote in message
news:ui**************@TK2MSFTNGP11.phx.gbl...
CREATE PROCEDURE zzz @userid numeric(18),@polim numeric(18) OUTPUT
AS
select * from users where userid=@userid

select @polim= count(*) from users
return (@polim)
GO

*********************
how can i gain the value of @polim in asp

in asp

set rs=baglantim.execute ("declare @sa as int exec zzz @userid='21',
@polim=@sa OUTPUT")

response.write rs("@sa")
like this (only i tried i dont know how can i gain the value it with execute method....)

Jul 19 '05 #2
Roji. P. Thomas wrote:
1. a RETURN value and OUTPUT value are differenct.
2. You can only RETURN an integer value.
3. Your SP RETURNS and OUTPUTS the count value.

To see how to use them from ASP, read

http://www.adopenstatic.com/faq/reco...ternatives.asp
and http://www.adopenstatic.com/faq/SprocsAndParameters.asp

The second FAQ article is very relevant. The only thing I have to add is
that stored procedure code generators exist. There's been a VB Addin
available for years that generates the VB code needed to create a Command
object and build the Parameters collection. I adapted that Addin, fixing a
couple deficiencies along the way, to enable it to generate the equivalent
vbscript code. It is available here:
http://www.thrasherwebdesign.com/ind...asp&c=&a=clear

Since you will have the source code, you will be able to modify it to do
what you want (say, for example, you don't like the variable names I used:
modify the vbscript to use your variable names.)
Bob Barrows

--
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"
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Michael Trosen | last post by:
Hi Everyone, I hope someone can help, I'm pretty new to pro*c programming. I have the following application setup: a pro*c program calls a stored procedure and recieves a cursor back: the...
3
by: Rhino | last post by:
I've spent the last couple of hours trying to figure out how to debug a Java stored procedure and am just going in circles. The last straw came when I got "Cannot open input stream for default"...
7
by: Jeff Wang | last post by:
Hi all, Can someone help me out? I've been struggling with this for almost a week and still have no clue what's wrong. Basically I want to write a DB2 stored procedure for OS/390 in REXX. In...
8
by: Thomasb | last post by:
With a background in MS SQL Server programming I'm used to temporary tables. Have just started to work with DB2 ver 7 on z/OS and stumbled into the concept of GLOBAL TEMPORARY TABLE. I have...
2
by: Kent Lewandowski | last post by:
hi all, Recently I wrote some stored procedures using java jdbc code (admittedly my first stab) and then tried to implement the same within java packages (for code reuse). I encountered...
6
by: Wojciech Wendrychowicz | last post by:
Hello to All, I'm trying to retrieve records from AS/400 in an VBA application. So, I've made an RPG program, then a stored procedure wchich calls that RPG program, and finally some VBA code to...
2
by: Eli | last post by:
Hi all We currently have a strange problem with calling a Stored Procedure (SQL Database) in our C# Project. The only error I get is "System error" which says a lot :) Background: We have...
7
by: Dabbler | last post by:
I'm using an ObjectDataSource with a stored procedure and am getting the following error when trying to update (ExecuteNonQuery): System.Data.SqlClient.SqlException: Procedure or Function...
4
by: nishi57 | last post by:
I hope I can get some help regarding this issue, which has been going on for a while. I have a desktop user who is having problem running "Stored Procedures". The DB2 Connect application works fine...
9
by: fniles | last post by:
I am using VB.NET 2003 and SQL2000 database. I have a stored procedure called "INSERT_INTO_MYTABLE" that accepts 1 parameter (varchar(10)) and returns the identity column value from that table....
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.