In Tkinter - having an input and an entry

markfernandes02 at markfernandes02 at
Sat Apr 5 05:56:15 EDT 2008

I need some advice,
I am creating a python program to communicate with an MS Access db in
python 2.4.
I can fetch records but cannot insert records.

def Insert(self, *row):
    global cursor, title, author, pubdate
    sqlInsert = "INSERT INTO Book_table"
    sqlInsert = sqlInsert + "(Bookname, BookAutor, "
    sqlInsert = sqlInsert + "Publicationdate) VALUES ('"
    sqlInsert = sqlInsert + title + "', '"
    sqlInsert = sqlInsert + author + "', "
    sqlInsert = sqlInsert + pubdate + ") "
    myconn = odbc.odbc('accessDatabase')
    cursor = myconn.cursor()

The above code does not work.
Also with Tkinter, i want to have user input records into the db, i
cannot get what the user inputs into the entry to become a string

If you can help it would be most appreciated.
Thanks in advanced


More information about the Python-list mailing list