Exercise on Tkinter & MySQL database

Basics of Python Tkinter

These questions are related to Tkinter using MySQL database. You must have installed required drivers for connecting to MySQL.

  1. Read first five records of student table and display in the window. Records display
  2. Take student ID as input from user and then display full details of the student. You must validate the user input for an integer. For any other value it should ask to check the inputs .
    Records display by entering ID
  3. Take four inputs ( name , class , mark and gender ) from user.

    All inputs are to be validated.
    Student Class must be selected from a drop down list box.
    Gender must be a selection of radio buttons .
    Mark must be integer.
    Name must be more than 2 char length.

    If validation fails then message to be displayed asking to check the inputs. If validation passes then insert the data and show the user the Unique Id of the student.
    Add record
  4. In the above script include error handling to show the error message returned by MySQL database.

    Change the table name or Column name to see how the SQL error message from MySQL is returned.
Displaying records from student table using Tkinter GUI
Detail sqlalchemy Database Error message from MySQL
Subscribe to our YouTube Channel here


* indicates required
Subscribe to plus2net


    Post your comments , suggestion , error , requirements etc here

    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 FORUM . Contact us
    ©2000-2022 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer