Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Return Value from Stored procedure

Reply
Thread Tools

Return Value from Stored procedure

 
 
bbawa1@yahoo.com
Guest
Posts: n/a
 
      06-19-2007
I have a stored procedure which is returning an int. Could you
pleasde give me ADO.Net code that how can I retrieve the returning
value from from stored procedure in aspx page and put that returning
value in a variable.

Thanks

 
Reply With Quote
 
 
 
 
Mark Rae
Guest
Posts: n/a
 
      06-19-2007
<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...

>I have a stored procedure which is returning an int. Could you
> pleasde give me ADO.Net code that how can I retrieve the returning
> value from from stored procedure in aspx page and put that returning
> value in a variable.


There's something wrong with your newsreader - it' just posted this in a new
thread...


--
http://www.markrae.net

 
Reply With Quote
 
 
 
 
Yuriy Solodkyy
Guest
Posts: n/a
 
      06-19-2007
SqlComand comm = new SqlCommand(connection);
comm.Text = @"

declare @res int
execute @res = spYouStoredProcedure @YourParameter = <yourvalue>
select @res"
);
int res = comm.ExecuteScalar();



> I have a stored procedure which is returning an int. Could you
> pleasde give me ADO.Net code that how can I retrieve the returning
> value from from stored procedure in aspx page and put that returning
> value in a variable.
>
> Thanks
>



 
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
stored procedure return value question philip ASP .Net 2 08-10-2006 03:42 PM
Is there a possibility to call a stored procedure on the MSSQL DB without java to wait for a return value? gagu911@gmx.ch Java 3 11-30-2005 03:59 PM
Stored Procedure Return value question Nick ASP .Net 8 02-10-2005 02:32 PM
Return a value from stored procedure to calling application Paul ASP .Net 1 01-19-2004 05:06 PM
Stored Procedure has both return value and data set (SqlDataReader) Neo Chou ASP .Net 1 08-03-2003 06:23 AM



Advertisments