freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Thompson, Bill D (London)" <ThompBil AT exchange.uk.ml.com>
- To: "'TDS Development Group'" <freetds AT franklin.oit.unc.edu>
- Subject: RE: Output parameters (was: Strange things)
- Date: Thu, 21 Nov 2002 08:10:54 -0000
Just to clarify on a couple of points.
Output parameters from stored procedures are still supported. So:
declare @b int
exec t0022 @b = @b output
is STILL a valid piece of TSQL
What has changed is that the TDS 7 protocol will no longer return the
contents of @b in a "parameter result" message, after a piece of SQL like
this is submitted to the server. The reasoning behind this is as follows:
In TDS 4.2 , there was no "low-level" or "direct" way of submitting a
stored procedure call to the server. The only way of doing that was to
submit a SQL statement like the one above. In order to get the ouptut
parameter back to the client, the TDS 4.2 protocol supported a "parameter
result" message when stored procedure calls were submitted in this way.
If you look at it though, this is a bit of a cludge. In this piece of SQL,
we have declared a variable, and then called a stored procedure to populate
it via an output parameter. Thats fine, and the server will do exactly what
it's asked to do. But there's nothing in that SQL which really says that the
client is interested in the contents of the variable after the stored
procedure call. So why return it ?
In TDS 7.0, there now IS a direct way of submitting a stored procedure call
to the server, passing input parameters and retrieving output parameters. So
the former method is now redundant.
Bill
-
RE: Output parameters (was: Strange things)
, (continued)
- RE: Output parameters (was: Strange things), Tankleff, Bruce, 11/19/2002
- RE: Output parameters (was: Strange things), Lowden, James K, 11/19/2002
- RE: Output parameters (was: Strange things), ZIGLIO Frediano, 11/20/2002
- RE: Output parameters (was: Strange things), Thompson, Bill D (London), 11/20/2002
- RE: Output parameters (was: Strange things), Castellano, Nicholas, 11/20/2002
- RE: Output parameters (was: Strange things), Lowden, James K, 11/20/2002
- RE: Output parameters (was: Strange things), Bob Kline, 11/20/2002
- RE: Output parameters (was: Strange things), Brian Bruns, 11/20/2002
- RE: Output parameters (was: Strange things), James K. Lowden, 11/20/2002
- RE: Output parameters (was: Strange things), James K. Lowden, 11/21/2002
- RE: Output parameters (was: Strange things), Thompson, Bill D (London), 11/21/2002
- RE: Output parameters (was: Strange things), Bob Kline, 11/21/2002
- RE: Output parameters (was: Strange things), ZIGLIO Frediano, 11/21/2002
- RE: Output parameters (was: Strange things), Bob Kline, 11/21/2002
- RE: Output parameters (was: Strange things), ZIGLIO Frediano, 11/21/2002
- RE: Output parameters (was: Strange things), James K. Lowden, 11/21/2002
- RE: Output parameters (was: Strange things), James K. Lowden, 11/21/2002
- RE: Output parameters (was: Strange things), Castellano, Nicholas, 11/21/2002
- RE: Output parameters (was: Strange things), ZIGLIO Frediano, 11/21/2002
- RE: Output parameters (was: Strange things), ZIGLIO Frediano, 11/21/2002
- RE: Output parameters (was: Strange things), James K. Lowden, 11/22/2002
Archive powered by MHonArc 2.6.24.