[freetds] MS SQL stored proceedure OUTPUT bindings and return
codes?
Martin Bonner
martin.bonner at argentas.co.uk
Sat Oct 18 00:54:45 EDT 2003
> From: "Martin Bonner" <martin.bonner at argentas.co.uk>
> Sent: Friday, October 17, 2003 10:09 PM
>
> I'm trying to gain access to both the return value of a stored proceedure
> and bind to its OUTPUT variables without much success.
>
> I don't appear to get a results set for the OUTPUT variables and the
results
> set of type 4043 (CS_STATUS_RESULTS) always contains a value of '0'
> regardless of the value returned by the stored proceedure.
Right, I've mananged to find some references in the archives to the changes
made in MS SQL 7.0 SP3 which change the way that the server responds when
using TDS 7.0, and sure enough, using TDS 4.2 results in the output bindings
working as I was expecting originally:-
resulttype: 4043 (CS_STATUS_RESULT)
$VAR1 = {
'COL(1)' => 0
};
resulttype: 4042 (CS_PARAM_RESULT)
$VAR1 = {
'@outvar' => 6
};
What i'm still not clear on though, is:
a) why the return value always comes back as 0 regardless of the value
returned by my stored procedure..
b) whether it is possible to retrieve the above OUTPUT bindings in some
other way when using TDS 7.0 with DBD::Sybase or whether this is still work
in progress..
Thanks in advance for any info....
Regards,
Martin
More information about the FreeTDS
mailing list