[Tutor] Truncating a Table

Leon Keylin ethics at gmail.com
Fri May 11 17:36:55 CEST 2007

Why would this not work?

import pymssql

con = pymssql.connect(host='server
cur = con.cursor()

query="TRUNCATE TABLE Consolidatedmsgs;"
print "Table Truncated: %d rows deleted" % cur.rowcount
The return I get is that the program runs through but it doesn't actually
truncate the table.
The user that runs this has all the rights (read, write, truncate, etc...)

Any ideas? And yes, I am using a pymssql extension module.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20070511/9b68ed85/attachment.htm 

More information about the Tutor mailing list