Hi,
Why is it that the following even though I call the below function? And how
do I write a function that makes connection that I can use to query my DB?
Traceback (most recent call last):
File "C:/Python33/My Stuff/schedule_machine/schedule_machine01.py", line
19, in <module>
cur.execute('INSERT INTO schedule \
NameError: name 'cur' is not defined
1. import csv
2. import sqlite3
3.
4. def connect():
5. conn = sqlite3.connect(':memory:')#use sch3.db or sch4.db ....
etc.
6. cur = conn.cursor()
7. cur.execute("create table schedule (teams integer, sn integer,
badge integer ,name text, grp integer,\
8. major text, track text, stage text, tc text)")
9.
10. connect()
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor