Re: Output parameter
- From: "William Vaughn \(MVP\)" <billva@xxxxxxxxx>
- Date: Tue, 21 Jul 2009 08:41:02 -0700
Output parameters can help in a number of ways. For the most part, they're more efficient than returning a row containing values--the overhead in the TDS stream is far lower and they give the developer more flexibility when returning data to the client. Returning a dozen OUTPUT parameters is far faster than returning a single row via a SELECT. Generally, OUTPUT parameters are used whenever you want to return one or more values that are not in a rowset like computed or @@ global values. In your SP you set the OUTPUT argument on the parameter declaration and use a SELECT or SET statement to set the value. On the client end, you create a Parameter object whose direction is set to output. Remember that the OUTPUT parameter packets are returned after any rowsets are returned.
hth
--
__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
http://betav.com http://betav.com/blog/billva
____________________________________________________________________________________________
"aspfun via SQLMonster.com" <u53138@uwe> wrote in message news:99682dbe2a420@xxxxxx
I have a few years program experience but I still do not understand how to.
use "output parameter" in program. For example, in ASP.NET.
Can some experts help me?
1) Why need output parameters?
2) Whe to use it?
3) How to use it?
--
Message posted via http://www.sqlmonster.com
- References:
- Output parameter
- From: aspfun via SQLMonster.com
- Output parameter
- Prev by Date: Re: Application cannot connect to SQL
- Next by Date: RE: SQL Server 2000 & SQL Server 2005
- Previous by thread: Output parameter
- Next by thread: Re: Output parameter
- Index(es):
Relevant Pages
|