In Tkinter - having an input and an entry
markfernandes02 at googlemail.com
markfernandes02 at googlemail.com
Sat Apr 5 10:00:10 EDT 2008
On Apr 5, 12:55 pm, Fredrik Lundh <fred... at pythonware.com> wrote:
> markfernande... at googlemail.com wrote:
> > Traceback (most recent call last):
> > File "F:\Programming\python and database\access_db8.2.py", line 129,
> > in ?
> > Tkwindow()
> > File "F:\Programming\python and database\access_db8.2.py", line 88,
> > in Tkwindow
> > title = stringVar()
> > NameError: global name 'stringVar' is not defined
>
> >>> "StringVar" == "stringVar"
> False
>
> </F>
Thanks it sorted out my 'StringVar' problem.
I now have another problem...
Exception in Tkinter callback
Traceback (most recent call last):
File "D:\Python24\lib\lib-tk\Tkinter.py", line 1345, in __call__
return self.func(*args)
TypeError: Insert() takes at least 1 argument (0 given)
Code below
def Insert(self, *row):
global cursor, title, author, pubdate, accessDatabase
sqlInsert = "INSERT INTO Book_table (Bookname, BookAutor,
Publicationdate) VALUES('title + ',' author + ',' pubdate)"
myconn = odbc.odbc('accessDatabase') #accessDatabase is the main
connection fn. to db stored on HardDrive
cursor = myconn.cursor()
cursor.execute(sqlInsert)
myconn.commit()
cursor.close()
myconn.close()
Tkanks for your tech support.
Mark
More information about the Python-list
mailing list