Skip to Content.
Sympa Menu

freetds - Re: [freetds] dblib and output parameters of stored procedures

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: LacaK <lacak AT zoznam.sk>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] dblib and output parameters of stored procedures
  • Date: Mon, 31 Mar 2014 08:15:29 +0200


I am trying work with output parameters of stored procedures using FreeTDS dblib
I am calling stored procedure using:
"declare @p int; EXEC pokus 1, @p OUTPUT"
after that call I am trying read count of output parametres using:
dbnumrets()
but it still returns 0
(same example tested with Microsoft ntwdblib returns 1)

Check the FAQ;
Thank you very much for response.

Yes I see it now. I have checked before these places:
http://www.freetds.org/reference/a00285.html
http://www.freetds.org/userguide/samplecode.htm#SAMPLECODE
And there is not mentioned that Microsoft no more supports these dbret* functions. So I get impression, that it should work as documented.

Interesting is that dbretstatus() still return return status of SP, but output parameters are not returned ;-)

you need to use the rpc functions to get the server to
return output parameters.
ntwdblib uses TDS 4.2. I guess the server still answers the old way on
the old protocol.
Yes, when I set TDS 4.2 with FreeTDS I get output parameters back

BTW what means message in tdsdump:
dblib.c:4742:..\..\src\dblib\dblib.c 4743: logic error: tds_process_tokens result_type 4043

Thanks
-Laco.





Archive powered by MHonArc 2.6.24.

Top of Page