Return Value from Stored procedure

B

bbawa1

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
 
M

Mark Rae

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...
 
Y

Yuriy Solodkyy

SqlComand comm = new SqlCommand(connection);
comm.Text = @"

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top