My favorites
▼
|
Sign in
pyodbc
Python ODBC library
Project Home
Downloads
Wiki
READ-ONLY: This project has been
archived
. For more information see
this post
.
Search
Search within:
All issues
Open issues
New issues
Issues to verify
for
Advanced search
Search tips
Subscriptions
Issue
170
attachment: test_pyodbc.py
(773 bytes)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import pyodbc
conn = pyodbc.connect('DRIVER={FreeTDS};SERVER=<server>;Port=1435;DATABASE=temp;UID=<user>;PWD=<pass>;TDS_Version=8.0')
cur = conn.cursor()
#cur.execute('DROP TABLE satest')
#cur.execute('CREATE TABLE satest(a VARCHAR(50))')
#conn.commit()
# uncomment the following if desired, they all pass
#insval = '1' * 44
#cur.execute("insert into satest(a) values (?)", insval)
#conn.commit()
#insval = u'1' * 43
#cur.execute("insert into satest(a) values (?)", insval)
#conn.commit()
#insval = u'1' * 45
#cur.execute("insert into satest(a) values (?)", insval)
#conn.commit()
#print 'three ok inserts'
# should create segfault
insval = u'1' * 44
cur.execute("insert into satest(a) values (?)", insval)
print 'would commit, but segfault happens first'
conn.commit()
Powered by
Google Project Hosting