I've checked stackoverflow a lot in the past and have always been able to find what I've been looking for, but I just can't seem to get this one to work so I'm asking my first question.
I'm not really a programmer, but I mentioned Python at work and now I have a Python project. I was actually getting everything figured out alright, but inserting values into a database is throwing me for a loop.
The Basic Problem:
I have a form built using Python and tkinter. When a button on the form is pressed I want values to be inserted into a database.
The Details:
I'm working with Python 3.4, pyodbc, and an Access 2003 database.
The database is just 1 table called file_info and it has the following fields, the fields data type is listed behind the pipe.
ID | AutoNumber
filename | Text
date | Date/Time
batch_amount | Number
parcel_amount | Number
sum_amount | Number
Eventually I'd like to insert some values calculated in other functions, but currently I'm just trying to insert some set values via a function and I can't get it to work.
Connection string:
db_file = r'''C:\Users\amarquart\Documents\testlockboxdb.mdb'''
user = 'admin'
password = ''
odbc_conn_str = 'DRIVER={Microsoft Access Driver (*.mdb,
*.accdb)};DBQ=%s;UID=%s;PWD=%s' % \
(db_file, user, password)
conn = pyodbc.connect(odbc_conn_s