Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Easy one
Message
From
07/11/2002 12:31:52
 
 
To
07/11/2002 12:09:11
Jim Rieck
Quicken Loans/Rock Financial/Title Sourc
Livonia, Michigan, United States
General information
Forum:
ASP.NET
Category:
Databases
Title:
Miscellaneous
Thread ID:
00719894
Message ID:
00719914
Views:
15
Jim,

Make your returned value an OUPUT parameter, like this:
ALTER PROCEDURE dbo.GetMaxTaskNo
(
        @project_id int,
        @MaxTaskNo  int OUTPUT
)
AS
SELECT @MaxTaskNo = max(isNull(task_no,0))
	FROM task_header
	WHERE project_id = @project_id

	RETURN
~~Bonnie


>All
>
>I'm working on a webform that populates a textbox by using the max() function from a stored procedure. I need the store procedure to return a value to the @RETURN_VALUE parameter in my dataadapter. How do I do this? The code for the stored procedure is below.
>
>
>ALTER PROCEDURE dbo.GetMaxTaskNo
>(
>	@project_id int
>)
>AS
>SELECT max(isNull(task_no,0)) AS "MaxTaskNo"
>	FROM task_header
>	WHERE project_id = @project_id
>
>	RETURN
>
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Reply
Map
View

Click here to load this message in the networking platform