Update A Record With SQLite - Python Tkinter GUI Tutorial #22

Поделиться
HTML-код
  • Опубликовано: 2 дек 2024

Комментарии • 79

  • @Codemycom
    @Codemycom  4 года назад +3

    ▶️ Watch Entire Tkinter Playlist ✅ Subscribe To My RUclips 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

  • @meaningfullife7075
    @meaningfullife7075 4 года назад +6

    12:40 That for loop is not necessary, you are editing just one record so you had to make it loop inside one record and without mentioning all the feilds of the one record :)

  • @Lennardish
    @Lennardish Год назад

    He;llo John, with all the help of your explanations, I succeeded in having the update entry boxes in the root window. My root.geometry("750x600") is wide enough to have two sets of entry boxes next to each other. It took quite some thinking but finally it succeeded. Well, it is in fact just followint the instructions of the leader :) Thanks again.

  • @exxzam
    @exxzam 4 года назад +2

    hey thanks for the video. i have a problem that when i turn the project i made by tkinter and sqllite to an exe file it doesn't open and say can execute script file. can you help me with that? is because i'm using sqllite with it?

  • @no-one-gaming-
    @no-one-gaming- 5 лет назад +2

    For updation
    when i use as you said entry object.insert it showing this error...
    entry_name.insert(0, record[0])
    AttributeError: 'NoneType' object has no attribute 'insert'

  • @firezerwudneh85
    @firezerwudneh85 4 года назад +1

    Great tutorials !! Wanted to ask ...does opening a new window with the Toplevel commnad differ from using the tk??

    • @Codemycom
      @Codemycom  4 года назад

      Yes, it can differ in small ways.

  • @Lennardish
    @Lennardish Год назад

    Hello John, very clear your explanaion of queries. Maybe I missed something, but suppose there is a database, fir insyance of a VERY LARGE Family, with their birthdays. How can I select just ONE name from the database, and see on screen the information I need, just to be not rude to have forgotten their birthday^^?

  • @elmo5269
    @elmo5269 2 года назад +4

    cursor.execute("SELECT FROM address WHERE oid ="+record_id ) sqlite3.operationalError: incomplete input
    can someone help me

    • @mrrobot3771
      @mrrobot3771 2 года назад

      same problem :/

    • @vidhiney
      @vidhiney 6 месяцев назад

      for the people of the future, its probably because your id number entry column is empty

  • @SwatcomComputers
    @SwatcomComputers Год назад

    Sir I have a question...
    mydb.execute ("select *from purchasetable where purhdate=?",[ mydate1.entry.get ()])
    This query returns accurate data
    from my date picker widgets or database...
    But i have 2 dates choosers..the 2nd one is mydate2..now what should i do chanhes to this query to get records between these 2 date pickers...these date pickers are ttkbootstrap's offsprings...thank you

  • @gayatrinadar5192
    @gayatrinadar5192 3 года назад

    This helped a lot.. Thanks :)

  • @fvefa
    @fvefa 4 года назад

    Thanks very wel explained

    • @Codemycom
      @Codemycom  4 года назад

      Thanks for watching!

  • @Raxer_th
    @Raxer_th 4 года назад +1

    In this video you create a new window with the "normal root" way. Hope you understand that) But in a previous you told us to use the Toplevel way. What are the differences?

    • @sailendrachettri8521
      @sailendrachettri8521 3 года назад +2

      If you create with using Toplevel, then whenever you close the main window the other window will also close automatically.
      but if you create using TK() then it not affected.
      Hope that make sense :)

  • @vamprock02
    @vamprock02 4 года назад +2

    cursor.execute("SELECT * FROM address WHERE oid ="+ _oid_)
    sqlite3.OperationalError: incomplete input
    I am getting this error
    can you pls help

    • @piwassana
      @piwassana 4 года назад +1

      cursor.execute("SELECT * FROM address WHERE oid ="+( _oid_))

  • @GS2YoutubeChannel
    @GS2YoutubeChannel 4 года назад +2

    Don't understand why you wouldn't use a Toplevel() window for this new window. In a previous video, you said to use Toplevels - surely you shouldn't deviate from this methodolgy?

    • @Codemycom
      @Codemycom  4 года назад

      You can do either. It depends on how you're going to use the window

  • @fredsmean
    @fredsmean 4 года назад

    Should I close the database connection at the end of the function? "Editor" or i called mine "update" function. To clarify. If so where do I place the connection closing statements.

  • @dizzydizzy4704
    @dizzydizzy4704 4 года назад

    In my database, not all the fields consist of text. Some of them are sliders from 1 to 5, and checkboxes Ho do I 'insert' the info from sliders and checkboxes into the edit function since neither sliders nor checkboxes have the 'insert' attribute?
    Thank you for your videos!

  • @Lennardish
    @Lennardish Год назад

    Hello John, love your video's. I have tried to change the addresses database program. What I wanted was that I could find just one very specific record by asking : "What name are you looking for?" For instance like this:
    person = input("What name are you looking for? : ")
    The result should be that the program produces that one record with the data of that person. I was not successful. Can you please give some nformation about how to have that desired result? Thanks , Paul . Netherlands

    • @Codemycom
      @Codemycom  Год назад

      I have videos on the playlist that show you how to do that

  • @aribiali3574
    @aribiali3574 4 года назад

    amazing !!! U SHOULD KNOW THAT I LOVE YOU XD

  • @matejkrenek5933
    @matejkrenek5933 4 года назад +1

    Hello,
    I have such a problem with update a record.
    When I click on the 'save record' button in second window (window where you can edit a record) it
    writes to me: c.execute("""UPDATE addresses SET
    sqlite3.OperationalError: no such column: zipcode"
    I even tried to copy your code from github.
    Do you know how to fix it?

    • @Codemycom
      @Codemycom  4 года назад

      Sorry, there's a problem with your code, or you haven't created a zipcode column in your database...either way I don't know how to fix it

  • @prajwalghatage7968
    @prajwalghatage7968 4 года назад +2

    For def edit execution (c.execute) it is giving incomplete input error

  • @zachfenton608
    @zachfenton608 2 года назад

    Great video, i have a problem with record_id = delete_box.get(). It's saying its not finding get().

    • @Codemycom
      @Codemycom  2 года назад

      What did you do different from the video?

  • @morrow.himself
    @morrow.himself 2 года назад

    How can I add the last name instead of adding the ID. I've been working on it for a long time, but I can't do it

  • @bakiyakannan3746
    @bakiyakannan3746 4 года назад

    Thank you for the video.While I am trying to execute this code I had an error like "name editor is not defined" on jupyter notebook.pls help me in this regard...

    • @Codemycom
      @Codemycom  4 года назад +1

      Don't use juypter notebooks for tkinter

  • @parsabahrambeik4381
    @parsabahrambeik4381 4 года назад

    Hi, thank you very much for your video.

  • @dianabor188
    @dianabor188 Год назад

    i am currently enrolled in your codemy course and need the source code for this please?

    • @Codemycom
      @Codemycom  Год назад

      All the code for this playlist is at: github.com/flatplanet/Intro-To-TKinter-RUclips-Course

  • @Xboerefijn1
    @Xboerefijn1 3 года назад

    Would it be possible to have the the gui autoupdate when something in the database changes, or after a specific time like every second to keep up to date with the database?

    • @Codemycom
      @Codemycom  3 года назад

      Sure, I have videos on timers on the playlist

    • @novaploca2080
      @novaploca2080 3 года назад

      Hi Ryan have you managed to do that, I am having trouble.
      Either every second program opens another instance of window or rows get inserted after last insert.

    • @Xboerefijn1
      @Xboerefijn1 3 года назад

      @@novaploca2080 Yes.
      Though I have only my main window:
      I went for an infinite while loop.
      Inside I first deleted the contents of the cell and than insert new contents.
      I set a sleep time of 10ms to not make it to heavy on my computer while keeping the contents of the cell always up to date and uneditable.

    • @novaploca2080
      @novaploca2080 3 года назад

      @@Xboerefijn1 tnx man

  • @Music-bo8ig
    @Music-bo8ig 2 года назад

    Can you explain how to save image to sqlit3 database, and how to read it using tkinter please

    • @Codemycom
      @Codemycom  2 года назад

      save/read it as a blob type, in the same way you save anything

    • @Music-bo8ig
      @Music-bo8ig 2 года назад

      @@Codemycom but only displaying bainery code😥😥😥

    • @Codemycom
      @Codemycom  2 года назад

      @@Music-bo8ig then you did it wrong

    • @Music-bo8ig
      @Music-bo8ig 2 года назад

      @@Codemycom so what is the correct method can you tell us pleas

    • @Codemycom
      @Codemycom  2 года назад +1

      @@Music-bo8ig I don't have any videos on that because these days you don't hold images in databases, you upload them to a cdn and save the url of the image to the database as text.

  • @martygeorgiev6086
    @martygeorgiev6086 4 года назад

    I have all my 'items' 'strings' listed into a TreeView and I'm trying to make the same 'update record' from the SQLite DB. Could someone give me a hand, please?

    • @Codemycom
      @Codemycom  4 года назад +1

      I'll likely do videos on treeview soon

  • @mee8963
    @mee8963 3 года назад

    Sir why can't u use toplevel for opening a new window

  • @allifmaalengineeringlimite9853
    @allifmaalengineeringlimite9853 3 года назад

    The update functions updates everything...

  • @generalpinochet9821
    @generalpinochet9821 4 года назад

    vid idea: make a code editor in tkinter

    • @Codemycom
      @Codemycom  4 года назад +1

      Yeah I might do that in the future

  • @Cric_shorts4091
    @Cric_shorts4091 3 года назад +1

    Error is showing that-
    list index out of range

    • @Codemycom
      @Codemycom  3 года назад

      What did you do differently from the video?

    • @Cric_shorts4091
      @Cric_shorts4091 3 года назад +1

      Sorry ! I got my mistake 😅

    • @Codemycom
      @Codemycom  3 года назад

      @@Cric_shorts4091 glad you got it sorted out

  • @daneshpatel5638
    @daneshpatel5638 3 года назад

    How we can save the Data created in excel

    • @Codemycom
      @Codemycom  3 года назад

      I have a course on python and excel with openpyxl

  • @jaysedits9492
    @jaysedits9492 2 года назад

    Is the source code available?

    • @Codemycom
      @Codemycom  2 года назад +1

      github.com/flatplanet/Intro-To-TKinter-RUclips-Course

  • @rafaelperezmederos6958
    @rafaelperezmederos6958 3 года назад

    Why isn’t my data appearing?

    • @Codemycom
      @Codemycom  3 года назад

      You messed up the code somewhere

  • @mistermayhem988
    @mistermayhem988 4 года назад

    incomplete input error?

    • @Codemycom
      @Codemycom  4 года назад

      I need more info than that. What's the entire error.

  • @parsabahrambeik4381
    @parsabahrambeik4381 4 года назад

    Hi, thank you very much for your video.