Re: Output parameter

Tech-Archive recommends: Speed Up your PC by fixing your registry



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

.



Relevant Pages

  • Re: Tutorial Needed...
    ... What is the proupose of Output parameters? ... Output parameters allow the stored procedures to return information back ... to the client. ... Not all stored procedures return a collection of records you know... ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Stored Procedure Expert needed
    ... OUTPUT parameters _after_ the rowset is returned. ... the data reader again in order to get the data from the select statement. ...
    (microsoft.public.data.ado)
  • Re: An Output parameter causes 80040e21 from Access 2000
    ... integer or other value instead of a rowset? ... and OUTPUT parameters, PRINT statements, RAISERROR messages and numbers ... "William Vaughn" escribió: ... > "David M E" wrote in message ...
    (microsoft.public.dotnet.framework.adonet)