0

Hi,

I'm really struggling with coursework for a university project, I need to be able to link to an Microsoft Access database and read and write to it using a Tkinter GUI, so far I have the following.

def do_select():
global list_box, cursor
item = list_box.curselection()
name = list_box.get(item)
stmt = "SELECT * from Stock"
cursor.execute(stmt)
product = cursor.fetchone()
print "The product " + product[0] + " is a " + name

I want to be able to display an entire row, when I run the code I have a Tk frame with a listbox which displays primary Ids of items, when I select the item I would like the rest of the information in the row to display to a entry control or similar. So far it write to the console but doesn't display the entire row. Admittedly I've chopped code up from other examples to get to where I am now, and I still feel less than confident with python. Any links or any help at all would be very much appreciated.

Regards

Mark

1
Contributor
1
Reply
2
Views
9 Years
Discussion Span
Last Post by StudentMark
0

Am I doing something wrong, do people need more information before they can help me. Would really appreciate some help.

Thanks in advance

Mark

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.