Question I have a simple application to query some of my oracle tables I want to be able to grab the value of my text boxes which work but, I keep getting this error any help would be greatly appreciated!
test.py
def grabEnts():
global date
connection = cx_Oracle.connect('xxxxxxxx/[email protected]:xxxx/xxx')
cursor = connection.cursor()
startdate = e1.get()
enddate = e2.get()
#fs = datetime.date(startdate)
#fe = datetime.date(endate)
//this works but, I would like to use both startdate and endate
#cursor.execute("SELECT EMP_ID FROM TO_ENTRIES WHERE LEAVE_START >= '%s'" % startdate)
//Like this but I can't get it to work I keep getting this error
File "test.py", line 62, in grabEnts
cursor.execute('SELECT EMP_FIRST_NAME FROM TO_ENTRIES WHERE LEAVE_START >=%s AND LEAVE_END <=%s', startdate, enddate)
TypeError: function takes at most 2 arguments (3 given)
cursor.execute('SELECT EMP_FIRST_NAME FROM TO_ENTRIES WHERE LEAVE_START >=%s AND LEAVE_END <=%s', startdate, enddate)
for row in cursor:
outputent.writerow(row)
cursor.close()
connection.close()