Database Table List as options of Tkinter Combobox and showing records of selected table

preview_player
Показать описание
00:43 connecting to different databases
02:14 Query to get list of tables from database
05:17 Adding Tkinter window template
05:40 Adding combobox to Tkinter window
08:37 Define Callback function my_show()
16:00 Creating string from the records to display inside Text widget

This script can work with any type of database, the connection object ( string ) and the query to collect the table is to be changed.
First part the connection string is to be created using any one of the available lines ( others are commented for different databases )

The variable name is maintained as my_conn throughout the script.

Download the source code from here.

#Tkinter #TablesAsOptions #Combobox #ListOfTables #SQLite #MySQL #plus2net #python
Рекомендации по теме
Комментарии
Автор

How show the record in the text box with out the tuple ()

alwaleedalssenamy