[python-sybase] How to interpret the cursor.rowcount?

hopfgartner hopfgartner at rolmail.net
Fri, 23 May 2003 17:04:33 +0200


Dear David Cole, dear list members,

I'm installing right now the world famous dbweaver (One of
the 0% activity projects on Sourceforge. Ok, I know, I'm
the project leader and only programmer of it) on a machine
here at work.

I installed sybase-0.36 and noted that the behaviour of
cursor.rowcount changed from earlier versions. 

In particular, when a query does not return any matching
row, the versions up to 0.36pre6 set the value of
cursor.rowcount to 0 (what I really expected it to be).
With 0.36, the value becomes -1.

Is this the desired behaviour or just a mino glitch?

Environment notes:
Client Platform 1: Trusted Debian 1.0 (based on Debian 3.0)
with python 2.1.2, freetds-0.61.
Client Platform 2: Debian testing as of today with python
2.2.2, freetds-0.61.
Database Server: SQL Server 2000, sp2, on Windows 2000
Server, sp3.

Best regards and enjoy the weekend,

Peter Hopfgartner