Sure, sorry, totally beginner. I've got the OptionMenu:
I'd like ON CHANGE to pass the value to the pyodbc connection:
I hope I'been able to explain my request.
Thanks
s = StringVar() s.set('a') om = OptionMenu(master, s, 'Server1', 'Server2', 'Server3', 'd') om.pack() def changed(*args): s.get() print(changed) [python][/python]
I'd like ON CHANGE to pass the value to the pyodbc connection:
Datab="Server1;" print(Datab) cnxn = pyodbc.connect("Driver={SQL Server Native Client 11.0};" +str(Datab)+ "Database=master;" "Trusted_Connection=yes;")instead to use Datab as variable I'd like to use changed (from option) and to refresh the mask after changing the value in the option menu.
I hope I'been able to explain my request.
Thanks