EXecuting SQL & SQLite database

SQL to manage SQlite database

Tkinter Query window to execute SQL commands SELECT UPDATE DROP with WHERE to learn and show results

Opening Query window

We will use the Query button to execute the function my_child() to open the child window. Inside this function we will display the Text to collect the user entered SQL.

Executing the query : my_data()

Our function my_data() will receive the query and first it will delete the previous data if any in our main display Text area . Then set the background to white by using config()

We will find out the type of query user has entered, if SELECT word is present then show all the records.

Using one try except code block run the query and set the result.

Finally we will display the result.

The connection to SQLite ( the connection.py file ) is available in Part -1 of SQlite connector.

connector-sqlite-v2
SQLite Connector Part -1 ( Browse and connect OR create database ) SQLite Connector Part -2 ( Query window )
Subhendu Mohapatra — author at plus2net
Subhendu Mohapatra

Author

🎥 Join me live on YouTube

Passionate about coding and teaching, I publish practical tutorials on PHP, Python, JavaScript, SQL, and web development. My goal is to make learning simple, engaging, and project‑oriented with real examples and source code.



Subscribe to our YouTube Channel here



plus2net.com







Python Video Tutorials
Python SQLite Video Tutorials
Python MySQL Video Tutorials
Python Tkinter Video Tutorials
We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles Contact us
©2000-2025   plus2net.com   All rights reserved worldwide Privacy Policy Disclaimer