Having a problem with rowcount
"Nicholas Veeser" <[email protected]>
| Newsgroups | gmane.comp.python.sybase |
|---|---|
| Message-ID | <[email protected]> |
So I am using FreeTDS with Python and Sybase.py.
I am do a connection, cursor, execute a query and can fetch the results of the query.
All that works.
But when I go to change the code to check the rowcount for the status of the query,
it is always -1. Should it not be set to the number of rows in the query, which for my
query is like 50.
Here is the code (basically):
conn = Sybase.connect( cfg['dsn'], cfg['user'], cfg['pass'] )
cursor = conn.cursor()
cursor.execute ("SELECT id, queuetype FROM Components")
print "XXX: rowcount:", cursor.rowcount
while (1):
row = cursor.fetchone()
if row == None: break
print row
connect.close()
Thanx
Nicholas