Re: dblib and output parameters of stored procedures
LacaK <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <[email protected]> |
> >> 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.