Skip to Content.
Sympa Menu

freetds - Re: [freetds] Problem with CS_PARAM_RESULT (c API) and MSSQL2k

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: wolkow AT rosnet.net, FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Cc:
  • Subject: Re: [freetds] Problem with CS_PARAM_RESULT (c API) and MSSQL2k
  • Date: Sat, 4 Jun 2005 13:48:06 -0400

Leonid O Volkov wrote:
> Hello, I am new in this list.
>
> I have problem with returning CS_PARAM_RESULT
> from exec stored procedure for MSSQL2k (in MSSQL7.0 no problem):
>
> "declare @REASON integer exec BUGPROC @REASON out"
>
> CREATE procedure BUGPROC
> @REASON int output
> as
> set nocount on
> set @reason = 99
> return 1
> GO
>
> I have FreeTDS version 0.63
...
> By means of what can I get CS_PARAM_RESULT by using MSSQL2k ?

As Frediano said, with SQL Server 2000 you can't get output parameter
values from a language command like "declare @REASON integer exec BUGPROC
@REASON out". Beginning actually with IIRC SP3 of SQL Server 7.0, the
server no longer returns the parameter output values to the client when a
stored procedure is invoked that way. You have to use the RPC functions
instead.

Have a look at these:

$ ls src/ctlib/unittests/r*
src/ctlib/unittests/rpc_ct_param.c
src/ctlib/unittests/rpc_ct_setparam.c

HTH.

--jkl





Archive powered by MHonArc 2.6.24.

Top of Page