Building Out The GUI for our Database App - Python Tkinter GUI Tutorial #20

  Рет қаралды 257,346

Codemy.com

Codemy.com

Күн бұрын

Building Out The GUI for our Database App. In this video we'll begin to build out the graphical user interface (GUI) for our database app with Tkinter. We'll add input boxes and buttons to add data to our database, and retrieve that data and output it onto the screen.
In this series I'll show you how to create graphical user interfaces for Python with Tkinter.
✅ Watch The Other Videos In This Python Playlist:
bit.ly/2UFLKgj
▶️ See More At:
Codemy.com
✅ Join My Facebook Group:
bit.ly/2GFmOBz
✅ Subscribe To My KZbin Channel:
bit.ly/2IGzvOR
▶️ Learn to Code at Codemy.com
Take $22 off with coupon code: youtube

Пікірлер: 463
@Codemycom
@Codemycom 4 жыл бұрын
▶️ Watch Entire Tkinter Playlist ✅ Subscribe To My KZbin Channel: bit.ly/2UFLKgj bit.ly/2IGzvOR ▶️ See More At: ✅ Join My Facebook Group: Codemy.com bit.ly/2GFmOBz ▶️ Learn to Code at Codemy.com ✅ Buy a Codemy T-Shirt! Take $30 off with coupon code: youtube1 bit.ly/2VC9WUN
@麦天正
@麦天正 4 жыл бұрын
Sorry, Could I ask how I can fix the error of sqlite3.OperationError: no such table: address
@Codemycom
@Codemycom 4 жыл бұрын
@@麦天正 rewatch the video and follow the directions exactly.
@wailsari6237
@wailsari6237 4 жыл бұрын
@@麦天正 i can help you
@lakshayahlawat6674
@lakshayahlawat6674 3 жыл бұрын
@@wailsari6237 bro i m facing the same issue
@errorhostnotfound1165
@errorhostnotfound1165 3 жыл бұрын
@@lakshayahlawat6674 same
@aaryansarnaik3758
@aaryansarnaik3758 3 жыл бұрын
Sometimes I wish I wasn't broke just to support amazing teachers like these
@Codemycom
@Codemycom 3 жыл бұрын
Ha! Appreciate the thought!
@livenere
@livenere 4 жыл бұрын
Great video, this is exactly what I was looking for. There is 1 thing I would like to do different that I'm unsure how to do. I would like to enter a oid into a text box, use the query button to look through the table for that oid, and populate the other input fields ( f_name, Zip, ect....). With the data that associated the the oid.
@Lennardish
@Lennardish Жыл бұрын
Hello John, I am a psychlogist and I collect data from large groups of students. Such as names, scores on various subjects, testscores, etc, etc. I am playing now with your program, using only first name and all kinds of scores. After that I use statistics to calculate sums per category, as well as standard deviation, percentile scores. So, this all means that I can benefit enormously from your basic database program. Thank you very much!!! :) Paul
@Codemycom
@Codemycom Жыл бұрын
Very cool Paul!
@Lennardish
@Lennardish Жыл бұрын
@@Codemycom Saint John II 🙂
@Codemycom
@Codemycom Жыл бұрын
@@Lennardish :-p
@hamakhdir6610
@hamakhdir6610 4 жыл бұрын
Object identifiers (OIDs) are used internally by SQLite as primary keys for various system tables. Also, an OID system column is added to user-created tables. Type oid represents an object identifier.
@cameronmclaughlin8024
@cameronmclaughlin8024 Жыл бұрын
Proud owner of lifetime membership, keep up the good work! 👍👍
@Codemycom
@Codemycom Жыл бұрын
Awesome, enjoy!
@tumpalmichaels4085
@tumpalmichaels4085 3 жыл бұрын
This channel is helpful for me cause this is the solution for my error in my thesis app. Thankyou😄
@Codemycom
@Codemycom 3 жыл бұрын
Awesome
@stevechoatie249
@stevechoatie249 Ай бұрын
Enjoying this video series on creating a database using python, tkinter and sqlite3. In the video you mentioned a discount code which after applying it gives you all of your videos and books. How many videos are on python and what books are included? Thanks!
@Codemycom
@Codemycom 22 күн бұрын
You can see the list of courses at Codemy.com and my books by searching my author page on amazon.com
@creativecore3575
@creativecore3575 3 жыл бұрын
this guy has taught me more about data science than all four of my college professors this semester
@Codemycom
@Codemycom 3 жыл бұрын
Ha, happy to hear it!
@alfiehammer3538
@alfiehammer3538 5 жыл бұрын
Just what I've been looking for. Thanks!
@terrywright6571
@terrywright6571 4 жыл бұрын
Thanks for this video. I have created a small database app to keep and manipulate golf scores and wanted a GUI front end. Plenty of stuff found about creating pretty screens and placing buttons etc but none that connect the GUI to the working program. Really good thanks. I shall be watching a lot more.
@Codemycom
@Codemycom 4 жыл бұрын
Glad it helped!
@lettherebelightfixtures
@lettherebelightfixtures 5 жыл бұрын
Hi. Great tutorial. I would like to point out that at 20:30 where you create the variable "print_records" in the for loop,we actually don't need it. You can write the for loop like this: for record in records: print(record[0]) It will workout exactly how you want it to without printing the first record twice.
@Codemycom
@Codemycom 5 жыл бұрын
yep
@tortolgawd4481
@tortolgawd4481 10 ай бұрын
Is there a difference aside from syntax? Maybe like performance or memory size? Would like to know
@yusufergin8576
@yusufergin8576 3 жыл бұрын
It's amazing! Just what I'm looking for for days! Thank you sooo much, man! Keep doing it, you are great!
@Codemycom
@Codemycom 3 жыл бұрын
Thanks, will do!
@Education_Hub101
@Education_Hub101 3 жыл бұрын
Best Course ever on tkinter
@Codemycom
@Codemycom 3 жыл бұрын
Thanks!
@viktor187
@viktor187 3 жыл бұрын
Those of you having problems with entering records to the table, try triple quotes around the INSERT INTO addressess function instead of single quotes.
@robertocarollo5214
@robertocarollo5214 2 жыл бұрын
i have tried this but its still saying "( "was not closed
@გიორგიიმედაშვილი-ყ1ს
@გიორგიიმედაშვილი-ყ1ს Жыл бұрын
Doesn't work, any other suggestions?
@swiftplays5993
@swiftplays5993 9 ай бұрын
@@გიორგიიმედაშვილი-ყ1ს Not sure if this will help or if I am too late, but I just put a comma after zipcode.get() and that seemed to solve the problem
@chillwithcode2987
@chillwithcode2987 3 жыл бұрын
I like the way you teach it's really helpful for me
@Codemycom
@Codemycom 3 жыл бұрын
Glad you like it!
@shrishsharma8333
@shrishsharma8333 3 жыл бұрын
*Thanks! Mr. White!*
@Codemycom
@Codemycom 3 жыл бұрын
Ha
@yellaturd
@yellaturd 4 жыл бұрын
Such a simple solution to my problem revealed in this video. I could not figure out how to pick between single pieces of data once they had been queried and fetched. Every time I treated the result as an item from a list or a tuple I could not seem to move through them correctly. I did not notice that it was actually both a list and a tuple.
@Codemycom
@Codemycom 4 жыл бұрын
:-)
@usmanfarooq1339
@usmanfarooq1339 5 жыл бұрын
man love your videos could please do a series on djnago!!!! THANKS
@dipnarayansen4751
@dipnarayansen4751 5 жыл бұрын
Ya that's one is a headache
@travisblack3198
@travisblack3198 Жыл бұрын
John, thank you for all of your great learning material provided at zero cost here on youtube. Beautiful content and amazing results. Hope its a good day in Vegas. Have a good day!
@Codemycom
@Codemycom Жыл бұрын
Welcome!
@AfzaalNabiDar
@AfzaalNabiDar 2 жыл бұрын
Really Very Helpful Video. Thank.
@saeidfanaeinia2014
@saeidfanaeinia2014 4 жыл бұрын
Very Useful Lesson. Thanks.
@antkings2
@antkings2 4 жыл бұрын
Thanks man you make this stuff easy to understand for sure.
@Codemycom
@Codemycom 3 жыл бұрын
Thanks! Glad you're enjoying it.
@mk9834
@mk9834 4 жыл бұрын
Thank you so much for this video, I have learnt a lot from this video!
@Codemycom
@Codemycom 4 жыл бұрын
Glad you enjoyed it!
@tudorcozma6781
@tudorcozma6781 5 жыл бұрын
thanks for lessons good and clear
@Richkotite1
@Richkotite1 3 жыл бұрын
I got it to work...my dumb mistake. Thank you for an awesome video...
@Jose_T131
@Jose_T131 3 жыл бұрын
Excellent video, subscribed
@Codemycom
@Codemycom 3 жыл бұрын
Thanks!
@hilaabraham7430
@hilaabraham7430 4 жыл бұрын
Thank you so much!!! love your videos !
@Codemycom
@Codemycom 4 жыл бұрын
You're very welcome!
@timyoung8839
@timyoung8839 4 жыл бұрын
Hi John. Really good tutorial! One question - regarding the need to comment out the 'create table' code after it has been run once since the table has been created. How would you go about doing this if you made a program that was to be run by the public. Would you make an if statement to check if the table already exist and only create a table if it doesn't? Thanks heaps!
@Codemycom
@Codemycom 4 жыл бұрын
Yeah I'd probably do that
@Hillov98
@Hillov98 3 жыл бұрын
Thank you! This helped me out a lot with a work project! Subbed :)
@Codemycom
@Codemycom 3 жыл бұрын
Glad to hear it!
@albertomorenogil6506
@albertomorenogil6506 2 жыл бұрын
Thank you for this video. It's very clear . Chapeau! I subscribe to your chanel. Thank you again.
@Codemycom
@Codemycom 2 жыл бұрын
Glad you liked it!
@AnujKumar-xn5tg
@AnujKumar-xn5tg 4 жыл бұрын
Sir, it will be more interesting when the form in filled by individuals and after they will submit the form we get their record in our database . CAN WE DO THIS??
@Codemycom
@Codemycom 4 жыл бұрын
Of course. Just keep watching the videos
@nriezedichisom1676
@nriezedichisom1676 2 жыл бұрын
Thank you for this video. I have a question. In the query function, when selecting from thr database, you wrote 'FROM addresses and my question is where did you get the addresses?
@Codemycom
@Codemycom 2 жыл бұрын
I named that in a previous video...check the playlist
@020cine
@020cine 4 жыл бұрын
I'm creating a room booking system where teachers log in and can view other bookings made by users and can create their own bookings too. I'm using Tkinter I'm making it a desktop application, so the users would have to download the code (system) to their laptop before they use it. I was wondering how I can make a centrally managed database (I think that's what it's called) so when the users log in to the system on their laptop and make a booking it is updated on the database so that everyone can see the bookings that all the teachers have made. I don't want each user to have their own database that is local to their machine and will only show their bookings. Does the database need to reside on one laptop so that the users have to connect to and use that database to see and make bookings? Do you have a tutorial on this or know of one? Thanks.
@Codemycom
@Codemycom 4 жыл бұрын
You're correct, the database would be different on each users computer. You'd need to instead link to an online database.
@020cine
@020cine 4 жыл бұрын
@@Codemycom how would I do that using sqlite? Do you have a video on it or do you recommend any site/tutorial so I can make it. Thanks
@Codemycom
@Codemycom 4 жыл бұрын
@@020cine Sorry, I don't have any videos on that...
@020cine
@020cine 4 жыл бұрын
@@Codemycom okay thanks. But do you know if I could link to an online database using sqlite? I've been looking online and I've read that I need to use PostgreSQL to link to an online database. But I'd rather use sqlite as it's built into python
@Codemycom
@Codemycom 4 жыл бұрын
@@020cine Depends on the webhost...
@wingielee
@wingielee 4 жыл бұрын
loving your videos massively...pls will appreciate if you continue your flask training series and also wont mind if you can do a videos series on pygame, i also notice you dont have that on your website..thanks bro
@Codemycom
@Codemycom 4 жыл бұрын
Planning on both...
@jensen_9393
@jensen_9393 3 жыл бұрын
i didnt smash the like button because i stuck here for 3 days, but i will continue ;o
@jensen_9393
@jensen_9393 3 жыл бұрын
me too
@jensen_9393
@jensen_9393 3 жыл бұрын
me three
@Codemycom
@Codemycom 3 жыл бұрын
?
@OfficialCondorHero
@OfficialCondorHero 2 жыл бұрын
Hello John, excellent video! I have a little problem.. When I enter a zip code that starts with a 0(zero), the record does not return the 0. Any feedback would be appreciated. Thank You
@dheerajchouhan2729
@dheerajchouhan2729 3 жыл бұрын
Hello Sir I am Dheeraj from India I follow whatever you said in this video and write exactly same code but I am getting 1 error which I don't understand how to solve I am new in this so can you please help me to resolve this problem. File "d:\pyn\TinkierGUI\T.24.py", line 27, in SUBMIT c.execute('''INSERT INTO addresses VALUES(f_name, l_name, address, city, state, Zipcode)''' , sqlite3.OperationalError: no such table: addresses can you please help ....
@julie8235
@julie8235 3 жыл бұрын
Thank you a lot, this is very helpful !
@Codemycom
@Codemycom 3 жыл бұрын
Glad it was helpful!
@viktor187
@viktor187 3 жыл бұрын
John goes: "So we add this variable here, go up here, create a function, then we pass this into the string, go over here place the label, name this text box, enter the database and BOOM" Me: "Okey.... he said something about boom, where do I find boomy-thingy?!" 😂😂😂 Great videos man, just the playlist I've been looking for. 👍
@Codemycom
@Codemycom 3 жыл бұрын
ha
@AnaMaria-kb7qk
@AnaMaria-kb7qk 3 жыл бұрын
You are a life saver.
@Codemycom
@Codemycom 3 жыл бұрын
Glad you found what you needed!
@toolzshed
@toolzshed 4 ай бұрын
Hi I was just wondering would python be a better programming language to use than a php crud application?
@Codemycom
@Codemycom 4 ай бұрын
it depends entirely on your objective
@itorres008
@itorres008 5 жыл бұрын
Was checking out Python as a new language to learn. Is this the most efficient way available to create a GUI? Using a text editor? Isn't there an Integrated Development Environment (IDE) lsimilar to MS Visual Studio where you drag fields, text boxes, labels, buttons onto screen and then change appearance, align automatically , etc??
@Codemycom
@Codemycom 5 жыл бұрын
There are several ways to do GUI's with Python. I like this one the best. There are drag and drop IDE's out there, but you still have to write the code on the backend.
@eduardosierra1673
@eduardosierra1673 3 жыл бұрын
hello im from México and my question is, can i connect pl/sql with python?, good video thanks!!
@Codemycom
@Codemycom 3 жыл бұрын
why not?
@-RakeshDhilipB
@-RakeshDhilipB 3 жыл бұрын
Yeah by mysql.connector module
@afrahtabassum7001
@afrahtabassum7001 3 жыл бұрын
Thanks a lot for this! Your videos are extremely helpful. I do have a question, is it possible for me to make a drop-down menu with options that can open up a new window? It's for a school project. Thanks!
@Codemycom
@Codemycom 3 жыл бұрын
Of course. I have videos on opening new windows. Use that code in a function that gets called when you click a dropdown (using bindings - I have a video on dependent drop downs that will show you how to bind a dropdown to run a function).
@afrahtabassum7001
@afrahtabassum7001 3 жыл бұрын
@@Codemycom Oh thank you so much. I will make sure to check them out!
@wonsztibijski3835
@wonsztibijski3835 Жыл бұрын
U are very good my friend
@Codemycom
@Codemycom Жыл бұрын
Thanks!
@codefoxx
@codefoxx 4 жыл бұрын
Interesting that you didn't create the textvariables for the entry boxes and you were able to use them with .get() inside the submit button. Mine didn't work unless I created the textvariables for the entry boxes first
@Codemycom
@Codemycom 4 жыл бұрын
Then you're doing something wrong...check your code for typos..
@sotirisriza
@sotirisriza 3 жыл бұрын
helloo, sorry to bother u, will you please help me, i get the error 'NoneType object has no atribute get' for the first one, is this what you are talking about? how did you fix it?
@dipnarayansen4751
@dipnarayansen4751 5 жыл бұрын
Love you sir....😍😍 You solved a lot of my problems...thank you
@Codemycom
@Codemycom 5 жыл бұрын
Glad to help!
@krisskross1680
@krisskross1680 4 жыл бұрын
Such an amazing video it really helped me a lot with my project thank you! Having only 1 problem at the moment where the strings entered in the boxes are being added to the database and printing as u'string' instead of just the string. How can I fix this?
@Codemycom
@Codemycom 4 жыл бұрын
Not sure what's going on
@Skirbiy
@Skirbiy 3 жыл бұрын
Do str() and put in parenthesis
@samehgrami7462
@samehgrami7462 4 жыл бұрын
Thank you for the video ! However , I am having an issue putting the below SQL query into Python : insert into GERVERSION values (10, 'xxxxxxxx', 7, 4, 2, getdate(),'') Note that in SQL , I have timestamp for the getdate() part Can you please help me out with the right syntax to put this into work ?
@boualiraz
@boualiraz 3 жыл бұрын
NO WE WON'T HELP!
@shahulvkhameed
@shahulvkhameed 4 жыл бұрын
Hello John...excellent tutorial..
@Codemycom
@Codemycom 4 жыл бұрын
Thanks!
@albertomorenogil6506
@albertomorenogil6506 2 жыл бұрын
In this example, being the names of fields in the table first_name, last_name, city, etc., along the video is used for some fields a reduced name f_name, l_name, whereas for other fields its complete / unmodified name is used: city, zipcode and so on. I ask: could be used always the full name or always a reduced / modified name: s_first_name, s_city, s_zipcode, etc. for every field and in any case, for instance: s_f_name = s_f_name.get() ? Thank you.
@danielhenthorn7589
@danielhenthorn7589 3 жыл бұрын
excellent resource!!
@mikespon
@mikespon 4 жыл бұрын
Great information, just what I needed. You are a great teacher! Please keep it up!
@Codemycom
@Codemycom 4 жыл бұрын
Thanks! I will!
@Lucas_giming
@Lucas_giming 5 жыл бұрын
I'm setting a data entry GUI, and following these videos for help. How do I set a table value if a certain criteria is met? For instance, I have a column in my table called Average, and on my form I have a checkbox allowing the user to include the entered data into the average (if it's checked then its included in average). So when inserting the values into the database, if the checkbox is checked I want it to insert "X" into the table, but if it is unchecked, I want it to be blank. Thank you so much for the help.
@Codemycom
@Codemycom 4 жыл бұрын
Use an if statement in your code.
@granand
@granand 4 жыл бұрын
Thanks a lot, A question, is this "Tutorial#20" in sequence ?
@Codemycom
@Codemycom 4 жыл бұрын
Yes
@0xDADDEE
@0xDADDEE 2 жыл бұрын
New drinking game: Take a shot every time John says concatenate incorrectly.
@parsabahrambeik4381
@parsabahrambeik4381 4 жыл бұрын
Hi, thank you very much for your video.
@Codemycom
@Codemycom 4 жыл бұрын
Thank you too
@karimloberg6876
@karimloberg6876 3 жыл бұрын
Would it be possible or beneficial to create a *class record* and make it so the attributes of *record* would be name, city etc.? Why/why not?
@Codemycom
@Codemycom 3 жыл бұрын
beneficial to what?
@akshayasundar5435
@akshayasundar5435 3 жыл бұрын
I am getting the following error when trying to insert into the database - ('The SQL contains 0 parameter markers, but 1 parameters were supplied', 'HY000'). Can you please help me resolve this?
@yashpradhan7228
@yashpradhan7228 5 жыл бұрын
Thanks Mr White
@Codemycom
@Codemycom 5 жыл бұрын
lol
@sportiano3348
@sportiano3348 2 жыл бұрын
any video for you to linked tow table in sqlite3 with tkinter ? and thanks for all that knowlege
@Codemycom
@Codemycom 2 жыл бұрын
Sure, check the playlist
@jfM0907
@jfM0907 2 жыл бұрын
Good day sir!. May I ask a copy of the code for this video sir? If its is ok . Thank you so much for your response
@Codemycom
@Codemycom 2 жыл бұрын
github.com/flatplanet
@leonardkabasa1902
@leonardkabasa1902 3 жыл бұрын
Hi I'm sorry to ask but for some reason I'm getting an error saying unrecognised token : ":". What should I do. Is it because I'm using multiple frame
@jesushernandez-gw2qj
@jesushernandez-gw2qj 3 жыл бұрын
Thanks for this video.
@Codemycom
@Codemycom 3 жыл бұрын
You're welcome
@versaquest
@versaquest 3 жыл бұрын
Thanks for doing these videos! Are you able to help with the following? I double check the code and it matches what you've created. "OperationalError: table addresses has 5 columns but 6 values were supplied" do I need new glasses????
@versaquest
@versaquest 3 жыл бұрын
Yup, need new glasses. Missing a comma.
@Codemycom
@Codemycom 3 жыл бұрын
@@versaquest ha! Yeah that's usually the case
@Corcontv
@Corcontv 3 жыл бұрын
what would be the best way to clear all of the information in the query label after you have fetched info from the database? I made a button that would .destroy the label but im having global variable issues and i can't help but think there is a much easier way im not seeing
@Codemycom
@Codemycom 3 жыл бұрын
config your label. whatever.config(text="")
@Corcontv
@Corcontv 3 жыл бұрын
@@Codemycom I knew it! So much easier than deleting the entire thing and then we making it, thank you very much!
@Codemycom
@Codemycom 3 жыл бұрын
@@Corcontv Sure thing :-)
@rafaelperezmederos6958
@rafaelperezmederos6958 3 жыл бұрын
How would you delete something tho? Like if it’s already in the Database can you do something like c.delete() ?
@Codemycom
@Codemycom 3 жыл бұрын
I think there are videos on deleting records in this playlist
@jammal_
@jammal_ 2 жыл бұрын
Would it work if i made an input for a user which would be str and then insert this input into c.execute(input)?
@Codemycom
@Codemycom 2 жыл бұрын
try it and see, I don't see why not
@sdaniels1288
@sdaniels1288 3 жыл бұрын
Could you use for loops to create an array of widgets in order to prevent so much reused code?
@Codemycom
@Codemycom 3 жыл бұрын
sure
@maxwellhawk
@maxwellhawk Жыл бұрын
is there Date/Time type of column in table? how to work with it if i need extract for example 2 dates and times and calculate period between them, in days, hours, minuts etc.
@Codemycom
@Codemycom Жыл бұрын
I have videos on dates and times somewhere in the playlist.
@vcharles1881
@vcharles1881 8 ай бұрын
Hello John, great videos, how do I access the source code? Thanks.
@Codemycom
@Codemycom 8 ай бұрын
github.com/flatplanet/Tkinter.com-KZbin
@vcharles1881
@vcharles1881 8 ай бұрын
Thank You.
@Codemycom
@Codemycom 8 ай бұрын
Welcome@@vcharles1881
@maxwellhawk
@maxwellhawk Жыл бұрын
i am trying to make custom window color. I changed window bg and buttons bg, yet the borderwidth and gap around button remain to have old Windows color, is it possible to overwrite it?
@Codemycom
@Codemycom Жыл бұрын
did you download my free tkinter widget book and check their attributes? I have lots of videos on using styles and themes
@BijuBenjamin
@BijuBenjamin 4 жыл бұрын
Excellent teaching !!! where can I find the full code..?
@Codemycom
@Codemycom 4 жыл бұрын
Thanks! github.com/flatplanet/Intro-To-TKinter-KZbin-Course
@phillibob41
@phillibob41 4 жыл бұрын
@@Codemycom Thanks for providing this. If I miss something, I can refer back to it. This is extremely helpful! Your course is great, BTW!
@Codemycom
@Codemycom 4 жыл бұрын
@@phillibob41 Thanks!
@stavrosnikiforos7798
@stavrosnikiforos7798 3 жыл бұрын
Can I use Python to connect to an existing MySQL database and extract some data? I would like to make a GUI in Tkinter to make queries and read data from an existing MySQL database located on another PC.
@Codemycom
@Codemycom 3 жыл бұрын
Generally, not if it's located on another computer. Unless you can connect to that computer some how...
@kaustavgoswami7454
@kaustavgoswami7454 Жыл бұрын
Thanks a lot u r my last hope
@Codemycom
@Codemycom Жыл бұрын
welcome
@vishwanathmuthuraman5530
@vishwanathmuthuraman5530 2 жыл бұрын
when i run the code on pycharm im not able to see the same dialoge box as you, all it says is that it worked and the code is running wiith out errors how do i see the GUI interface? please help.
@Codemycom
@Codemycom 2 жыл бұрын
I can't figure out why people use pycharm.
@danishbehal8135
@danishbehal8135 6 ай бұрын
Hello!!, Is the last entry of oid in each record automatically saved ? because in my case its not just even there .
@Codemycom
@Codemycom 6 ай бұрын
Not sure what you mean, nothing is ever automatically saved .
@danishbehal8135
@danishbehal8135 6 ай бұрын
@@Codemycom I am getting error when I try to print OID using 'record[6] ' - index out of range . Does it mean that my table doesn't contain a column containing OIDs
@danishbehal8135
@danishbehal8135 6 ай бұрын
Oh Sorry, I missed that. ' *,oid' in c.execute
@Codemycom
@Codemycom 6 ай бұрын
@@danishbehal8135, glad you got it sorted out
@usair1232
@usair1232 4 жыл бұрын
Hi john, for some reason after we create the query function, the returned values look like strings, not nicely formatted with no ()'s and ""' s, any help would be great
@Codemycom
@Codemycom 4 жыл бұрын
Without seeing your code, I couldn't guess...you must have done something weird tho :-p
@usair1232
@usair1232 4 жыл бұрын
@@Codemycom thanks for the quick reply, I had to continue formatting sir! But I guess I do have another question, is there a way to bring the oid to the beginning of the string, as opposed to the end? thanks man!
@Codemycom
@Codemycom 4 жыл бұрын
Not sure what you mean
@dimitarstoynev8061
@dimitarstoynev8061 2 жыл бұрын
When I try to clear the entry box which is in a toplevel window it says that the entry box is not defined, I declare the entry box in a method maybe that is why I cannot use it outside of the function. Have any idea how to fix it?
@Codemycom
@Codemycom 2 жыл бұрын
must make it global
@youssefbenhmida4408
@youssefbenhmida4408 4 жыл бұрын
can we make this project with for loops in order to make the entries and the labels, i had some issues with that . any helps will be appreciated
@Codemycom
@Codemycom 4 жыл бұрын
Sure...check the playlist...I have a video on that
@Manicarts3D
@Manicarts3D Жыл бұрын
At around the 19:20 mark we can see that his entries are printed in the console, but when I got to this step it would only print: [ ] I've played around with checking variable names and database terms but it looks fine to me, did anyone else get this? If so how did you fix it?
@Codemycom
@Codemycom Жыл бұрын
You have an error in your code somewhere
@ChaminduWeerasinghe
@ChaminduWeerasinghe 3 жыл бұрын
oid mean object id of ORDB (object oriented data-basees).
@stephenaubreyantonio8110
@stephenaubreyantonio8110 3 жыл бұрын
Hello, when i execute the def submit(): the error is showing 'sqlite3.ProgrammingError: You did not supply a value for binding 1.'
@Codemycom
@Codemycom 3 жыл бұрын
What did you do differently from the video?
@anasbhih5114
@anasbhih5114 3 жыл бұрын
what linter are you using? I don't' get that much of highlights in my vscode
@Codemycom
@Codemycom 3 жыл бұрын
None...just default sublime text
@sakichan2640
@sakichan2640 3 жыл бұрын
hello , I wrote the same script but I received this message: tkinter.tclerror cannot use geometry manager pack inside . which already has slaves managed by grid how to fix it? Thank u
@Codemycom
@Codemycom 3 жыл бұрын
you didn't write the same script. You can't pack and grid in the same parent widget
@Kalween8326
@Kalween8326 2 жыл бұрын
You my friend get a like and sub. Thank you for very useful vidoes
@Codemycom
@Codemycom 2 жыл бұрын
Thanks!
@pranavamr760
@pranavamr760 3 жыл бұрын
John im just asking but do you keep saying the join codemy.com everytime or is it prerecorded
@Codemycom
@Codemycom 3 жыл бұрын
I say it everytime
@pranavamr760
@pranavamr760 3 жыл бұрын
@@Codemycom lol ur so perfect in saying that... same expression hand movement and everything lol...im catching up with your videos im on 139
@Codemycom
@Codemycom 3 жыл бұрын
@@pranavamr760 ha thanks, I've had a lot of practice :-p
@pranavamr760
@pranavamr760 3 жыл бұрын
@@Codemycom haha..practice go brrrrr
@wailsari6237
@wailsari6237 4 жыл бұрын
thank you very much
@Codemycom
@Codemycom 4 жыл бұрын
You are welcome
@pro_fessor.
@pro_fessor. Жыл бұрын
Is there any ways to overwrite the updated data when we know it's index position
@Codemycom
@Codemycom Жыл бұрын
of course, basic database programming allows that
@twojdobrykolega8597
@twojdobrykolega8597 Жыл бұрын
why cant I open images? i tried r"...." as raw string. I also tried \\ double backshlshes instead of normal ones. Nothing doesnt work. Help me pls
@alexbeglan2563
@alexbeglan2563 6 ай бұрын
make sure you're using "/", not "\"
@vishwanathmuthuraman5530
@vishwanathmuthuraman5530 2 жыл бұрын
What’s the code to connect to SQL server instead of SQLite like on the video … do you know ?
@Codemycom
@Codemycom 2 жыл бұрын
SQL Server is a Microsoft product...it's completely different and doesnt really work here
@swaritacharya8765
@swaritacharya8765 4 жыл бұрын
Hello sir. I am having trouble saving the data in the database with the button. It is showing: Exception in Tkinter callback Traceback (most recent call last): File "C:\Users\Anjaney\anaconda3\lib\tkinter\__init__.py", line 1705, in __call__ return self.func(*args) File ".\database.py", line 45, in Submit 'zipcode_entry' : zipcode_entry.get(), sqlite3.OperationalError: table addresses has 4 columns but 6 values were supplied Please help.
@swaritacharya8765
@swaritacharya8765 4 жыл бұрын
here is the code: from tkinter import * from PIL import ImageTk, Image import sqlite3 root = Tk() root.title("Database") # Databases # create or connect conn = sqlite3.connect("address_book.db") # cursor c = conn.cursor() #create table ''' c.execute("""CREATE TABLE addresses ( first_name text, last_name text, address text, state text, city text, zipcode integer, )""") ''' def Submit(): # create or connect conn = sqlite3.connect("address_book.db") # cursor c = conn.cursor() #insert to database c.execute("INSERT INTO addresses VALUES (:f_name, :l_name, :address_entry, :state_entry, :city_entry, :zipcode_entry)", { 'f_name' : f_name.get(), 'l_name' : l_name.get(), 'address_entry' : address_entry.get(), 'state_entry' : state_entry.get(), 'city_entry' : city_entry.get(), 'zipcode_entry' : zipcode_entry.get(), }) #commits changes conn.commit() #close connection conn.close() #clear f_name.delete(0, END) l_name.delete(0, END) address_entry.delete(0, END) state_entry.delete(0, END) city_entry.delete(0, END) zipcode_entry.delete(0, END) # entries: f_name = Entry(root, width = 100) f_name.grid(row = 0, column = 1, columnspan = 15, padx = 20, pady = 10) l_name = Entry(root, width = 100) l_name.grid(row = 2, column = 1, columnspan = 15, padx = 20, pady = 10) address_entry = Entry(root, width = 100) address_entry.grid(row = 4, column = 1, columnspan = 15, padx = 20, pady = 10) state_entry = Entry(root, width = 100) state_entry.grid(row = 6, column = 1, columnspan = 15, padx = 20, pady = 10) city_entry = Entry(root, width = 100) city_entry.grid(row = 8, column = 1, columnspan = 15, padx = 20, pady = 10) zipcode_entry = Entry(root, width = 100) zipcode_entry.grid(row = 10, column = 1, columnspan = 15, padx = 20, pady = 10) # labels f_name_label = Label(root, text = "Enter first name") f_name_label.grid(row = 0, column = 0) l_name_label = Label(root, text = "Enter last name") l_name_label.grid(row = 2, column = 0) address_label = Label(root, text = "Enter address name") address_label.grid(row = 4, column = 0) state_label = Label(root, text = "Enter state name") state_label.grid(row = 6, column = 0) city_label = Label(root, text = "Enter city name") city_label.grid(row = 8, column = 0) zipcode_label = Label(root, text = "Enter zipcode") zipcode_label.grid(row = 10, column = 0) # submit submit = Button(root, text = "Submit", command = Submit, bg = "green", padx = 50, pady = 20) submit.grid(row = 11, column = 0) #commits changes conn.commit() #close connection conn.close() root.mainloop()
@midhunk7555
@midhunk7555 3 жыл бұрын
Hi , instead of table contents it returns some hexadecimal numbers . Could you please help me
@Codemycom
@Codemycom 3 жыл бұрын
You just have a typo somewhere
@ClusterSeries
@ClusterSeries 4 жыл бұрын
Sir, can we make android apps using python ??
@Codemycom
@Codemycom 4 жыл бұрын
sure but not with tkinter
@mampiisaotaku
@mampiisaotaku 4 жыл бұрын
lol. i got an error. then, after a few minutes, it took me some time to realize that the name of the database is different from the previous video. anyway, works like a charm
@Codemycom
@Codemycom 4 жыл бұрын
Glad you got it sorted out
@kaushallyadealwis8192
@kaushallyadealwis8192 3 жыл бұрын
i get this error for some reason: cursor.execute("INSERT INTO addresses VALUES (:f_name, :l_name, :address, :city, :age, :postcode)", sqlite3.OperationalError: no such table: addresses Here's my code: from tkinter import * import sqlite3 # Confinguring window and features root = Tk() root.title("Databases") root.configure(bg="#2C3E50") root.resizable(False, False) # Entry requests # first_name # last_namet # address # city # age # postal_code def submit(): # Create or connect to a database database_connect = sqlite3.connect("address-book.db") # Creating cursor cursor = database_connect.cursor() # Insert data in table in database. cursor.execute("INSERT INTO addresses VALUES (:f_name, :l_name, :address, :city, :age, :postcode)", { "f_name": f_name.get(), "l_name": l_name.get(), "address": address.get(), "city": city.get(), "age": age.get(), "postcode" : postcode.get() }) # Commit changes database_connect.commit() # Close database connection database_connect.close() f_name.delete(0, END) l_name.delete(0, END) address.delete(0, END) city.delete(0, END) age.delete(0, END) postcode.delete(0, END) label_top = Label(root, text="Sign up", font=("Calibri", 40), padx=220, pady=10, bg="#F89403", fg="white") label_top.grid(row=0, column=0, columnspan=2) label_fname = Label(root, text=" First name", font=("Calibri", 25), fg="white", bg="#2C3E50") label_fname.grid(row=1, column=0, pady=(30, 0)) f_name = Entry(root, bg="#6C7A89", font=("Calibri", 25), highlightthickness=1, fg="white") f_name.config(highlightbackground="#6C7A89", highlightcolor="#6C7A89") f_name.grid(row=1, column=1, pady=(30, 0)) label_lname = Label(root, text=" Last name", font=("Calibri", 25), fg="white", bg="#2C3E50") label_lname.grid(row=2, column=0, pady=(30, 0)) l_name = Entry(root, bg="#6C7A89", font=("Calibri", 25), highlightthickness=1, fg="white") l_name.config(highlightbackground="#6C7A89", highlightcolor="#6C7A89") l_name.grid(row=2, column=1, pady=(30, 0)) label_address = Label(root, text=" Address", font=("Calibri", 25), fg="white", bg="#2C3E50") label_address.grid(row=3, column=0, pady=(30, 0)) address = Entry(root, bg="#6C7A89", font=("Calibri", 25), highlightthickness=1, fg="white") address.config(highlightbackground="#6C7A89", highlightcolor="#6C7A89") address.grid(row=3, column=1, pady=(30, 0)) label_city = Label(root, text="City/Town", font=("Calibri", 25), fg="white", bg="#2C3E50") label_city.grid(row=4, column=0, pady=(30, 0)) city = Entry(root, bg="#6C7A89", font=("Calibri", 25), highlightthickness=1, fg="white") city.config(highlightbackground="#6C7A89", highlightcolor="#6C7A89") city.grid(row=4, column=1, pady=(30, 0)) label_age = Label(root, text=" Age", font=("Calibri", 25), fg="white", bg="#2C3E50") label_age.grid(row=5, column=0, pady=(30, 0)) age = Entry(root, bg="#6C7A89", font=("Calibri", 25), highlightthickness=1, fg="white") age.config(highlightbackground="#6C7A89", highlightcolor="#6C7A89") age.grid(row=5, column=1, pady=(30, 0)) label_postcode = Label(root, text="Postal code", font=("Calibri", 25), fg="white", bg="#2C3E50") label_postcode.grid(row=6, column=0, pady=30) postcode = Entry(root, bg="#6C7A89", font=("Calibri", 25), highlightthickness=1, fg="white") postcode.config(highlightbackground="#6C7A89", highlightcolor="#6C7A89") postcode.grid(row=6, column=1, pady=30) add_data = Button(root, text="Add to database", font=("Calibri", 30), padx=157, pady=10, bg="#F89403", fg="white", activebackground="#F89403", activeforeground="white", bd=0, command=submit) add_data.grid(row=7 , column=0, columnspan=2) selection = Button(root, text="Show selection", font=("Calibri", 30), padx=167, pady=10, bg="#F89403", fg="white", activebackground="#F89403", activeforeground="white", bd=0) selection.grid(row=8, column=0, columnspan=2, pady=(11, 11)) # Creating main event loop root.mainloop() Can u plsss run this in ur editor and try fix it for me pls
@rafaelperezmederos6958
@rafaelperezmederos6958 3 жыл бұрын
Hi there am getting an error where it says “ address_e”: address_e.get() sqlite3. OperationalError: unrecognized token “:” how do I resolve this?
@bb-ur2dk
@bb-ur2dk 3 жыл бұрын
hi john, first of all thanks for the video while inserting the record I am facing this error ''TypeError: function takes at most 4 arguments (23 given) ''
@Codemycom
@Codemycom 3 жыл бұрын
What did you do differently from the video?
@parsabahrambeik4381
@parsabahrambeik4381 4 жыл бұрын
Hi, thank you very much for your video. I just followed your video to connect to the database ... but you did not continue with MySQL or SQL. This is very unfortunate.
@Codemycom
@Codemycom 4 жыл бұрын
I have entire courses in both MySQL and SQLite3 on my Codemy.com website
Using Databases With TKinter - Python Tkinter GUI Tutorial #19
9:40
Seja Gentil com os Pequenos Animais 😿
00:20
Los Wagners
Рет қаралды 24 МЛН
Миллионер | 1 - серия
34:31
Million Show
Рет қаралды 2,8 МЛН
Я сделала самое маленькое в мире мороженое!
00:43
Кушать Хочу
Рет қаралды 4,3 МЛН
Convert GUI App to Real Program -  Python to exe to setup wizard
23:27
Python Simplified
Рет қаралды 531 М.
Modern Graphical User Interfaces in Python
11:12
NeuralNine
Рет қаралды 1,6 МЛН
Use a Drag & Drop Editor to Make Tkinter Python GUI Applications!
11:16
Update A Record With SQLite - Python Tkinter GUI Tutorial #22
15:04
Create Stunning Python GUIs in 10 Minutes With Drag & Drop
11:38
Coding Is Fun
Рет қаралды 77 М.
This Is Why Python Data Classes Are Awesome
22:19
ArjanCodes
Рет қаралды 809 М.
Seja Gentil com os Pequenos Animais 😿
00:20
Los Wagners
Рет қаралды 24 МЛН