My favorites | Sign in
Project Home Downloads Wiki
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions

Issue 340 attachment: test_cancel.py (193 bytes)

1
2
3
4
5
6
7
8
9
10
11
12
13
import pyodbc

cnxn = pyodbc.connect('CONNECTION_STRING')
cursor = cnxn.cursor()

i=0
for row in cursor.execute("select * from my_tabe"):
i = i + 1
if (i > 5):
cursor.cancel()
print row


Powered by Google Project Hosting