[python-sybase] Sybase, Freetds, and stored procedure return codes

Charles Bearden Charles.F.Bearden at uth.tmc.edu
Wed, 4 Aug 2004 09:23:13 -0500


> Ryan Felder wrote:
> >  I am working on a project that uses Sybase and Freetds under
solaris to
> > talk to a MSsql server,
> > and code that seems to have worked in the past, no longer works with
a
> more
> > up to date version of
> > Sybase.
> >
> >  We use a stored procedure to authenticate users, and when it fails,
it
> has
> > a return code. I can
> > not find how to retreive this return code any longer. Our code used
to
> > receive this in the first
> > row of data returned, but now, we cannot find it. I am running this
with
> > current versions of
> > Python, Sybase, and Freetds, under solaris 9. Anyone with ideas is
my
> > saviour.
>=20
> My first step would be to see if the same failure happens when using
> Perl and FreeTDS.  This would tell you if the problem is in FreeTDS or
> not.
>=20
> I think it possible to get FreeTDS to produce copious debugging - this
> might let you compare what the Python module is doing relative to the
> Perl module.

The FreeTDS User Guide has a page on logging[1].  In brief, set the
TDSDUMP environment variable to the path of the file to which you want
to log.

[1] http://www.freetds.org/userguide/logging.htm

Chuck Bearden
Systems Analyst III
School of Health Information Sciences
University of Texas at Houston
713.500.3954 (voice)
713.500.3907 (fax)
Charles.F.Bearden@uth.tmc.edu