Skip to Content.
Sympa Menu

freetds - Re: Output parameters (src/dblib/unittests/t0022.c)

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Bill Thompson" <thompbil AT exchange.uk.ml.com>
  • To: freetds AT franklin.oit.unc.edu
  • Subject: Re: Output parameters (src/dblib/unittests/t0022.c)
  • Date: Mon, 14 Oct 2002 10:47:18 -0400


Hi all,

I'm just picking up on this old issue, as I've stumbled across it whilst
doing some re-testing on the latest code (in particular
dblib/unittests/t0022).

I have found the same thing that others discovered, namely that in TDS7/8
the "0xac" parameter return stream is missing when the stored procedure in
t0022 is executed. It is definitely present in TDS4.2, and also in TDS 5.0
with Sybase. Hmmmm.

My betting is that this information will only be returned if we implement
the streams that underly dbrpcinit, dbrpcparam, dbrpcsend/dbrpcexec .
That's only a hunch however. There's something in the SQL server
(dbrpcinit) help which suggests a difference between using these calls and
not, to whit:

"Using DB-Library functions instead of an EXECUTE statement accommodates
return parameters for stored procedures more quickly. With a remote stored
procedure, the return parameters are always available to the application
by calling dbretdata. (Note, however, that a return parameter must be
specified as such when it is first added to the stored procedure through
dbrpcparam.)
If a stored procedure is called with an EXECUTE statement, the return
parameter values are available only if the command batch containing the
EXECUTE statement uses local variables, rather than constants, as the
return parameters. This involves additional parsing each time the command
batch is executed."

I know that this doesn't explicitly say you HAVE to use dbrpcinit etc. to
see the return parameters, but that's where my money is anyway.

Is anyone working on the dbrpc* functions ?

Bill




Archive powered by MHonArc 2.6.24.

Top of Page