Java prog#17.How to update/Edit a data in SQLite (MySql) Database in Netbeans java

Sdílet
Vložit
  • čas přidán 10. 05. 2012
  • ★★★Top Online Courses From ProgrammingKnowledge ★★★
    Python Programming Course ➡️ bit.ly/2vsuMaS ⚫️ bit.ly/2GOaeQB
    Java Programming Course ➡️ bit.ly/2GEfQMf ⚫️ bit.ly/2Vvjy4a
    Bash Shell Scripting Course ➡️ bit.ly/2DBVF0C ⚫️ bit.ly/2UM06vF
    Linux Command Line Tutorials ➡️ bit.ly/2IXuil0 ⚫️ bit.ly/2IXukt8
    C Programming Course ➡️ bit.ly/2GQCiD1 ⚫️ bit.ly/2ZGN6ej
    C++ Programming Course ➡️ bit.ly/2V4oEVJ ⚫️ bit.ly/2XMvqMs
    PHP Programming Course ➡️ bit.ly/2XP71WH ⚫️ bit.ly/2vs3od6
    Android Development Course ➡️ bit.ly/2UHih5H ⚫️ bit.ly/2IMhVci
    C# Programming Course ➡️ bit.ly/2Vr7HEl ⚫️ bit.ly/2W6RXTU
    JavaFx Programming Course ➡️ bit.ly/2XMvZWA ⚫️ bit.ly/2V2CoAi
    NodeJs Programming Course ➡️ bit.ly/2GPg7gA ⚫️ bit.ly/2GQYTQ2
    Jenkins Course For Developers and DevOps ➡️ bit.ly/2Wd4l4W ⚫️ bit.ly/2J1B1ug
    Scala Programming Tutorial Course ➡️ bit.ly/2PysyA4 ⚫️ bit.ly/2PCaVj2
    Bootstrap Responsive Web Design Tutorial ➡️ bit.ly/2DFQ2yC ⚫️ bit.ly/2VoJWwH
    MongoDB Tutorial Course ➡️ bit.ly/2LaCJfP ⚫️ bit.ly/2WaI7Ap
    QT C++ GUI Tutorial For Beginners ➡️ bit.ly/2vwqHSZ
    ★★★ Online Courses to learn ★★★
    Get 2 FREE Months of Unlimited Classes from skillshare - skillshare.eqcm.net/r1KEj
    Data Science - bit.ly/2lD9h5L | bit.ly/2lI8wIl
    Machine Learning - bit.ly/2WGGQpb | bit.ly/2GghLXX
    Artificial Intelligence - bit.ly/2lYqaYx | bit.ly/2NmaPya
    MERN Stack E-Degree Program - bit.ly/2kx2NFe | bit.ly/2lWj4no
    DevOps E-degree - bit.ly/2k1PwUQ | bit.ly/2k8Ypfy
    Data Analytics with R - bit.ly/2lBKqz8 | bit.ly/2lAjos3
    AWS Certification Training - bit.ly/2kmLtTu | bit.ly/2lAkQL1
    Projects in Java - bit.ly/2kzn25d | bit.ly/2lBMffs
    Machine Learning With TensorFlow - bit.ly/2m1z3AF | bit.ly/2lBMhnA
    Angular 8 - Complete Essential Guide - bit.ly/2lYvYRP
    Kotlin Android Development Masterclass - bit.ly/2GcblsI
    Learn iOS Programming Building Advance Projects - bit.ly/2kyX7ue
    ★★★ Follow ★★★
    My Website - www.codebind.com
    DISCLAIMER: This video and description contains affiliate links, which means that if you click on one of the product links, I’ll receive a small commission. This help support the channel and allows us to continue to make videos like this. Thank you for the support!
    How to update a data in database in Netbeans java
    How To Update Data In Text File Using Database In Java
    netbeans java tutorial
    Updating records in the Database using JDBC with Java netbeans
    Updating a Row in a Database Table in java netbeans
    How to and update sql table through JTable netbeans
    java netbeans and SqLite ,Mysql (sql update statement)
    Edit records in the Database using JDBC with Java netbeans
    How To Edit Data In Text File Using Database In Java
    iit Learn java netbeans
    java tutorial netbeans

Komentáře • 89

  • @mayurgudi3282
    @mayurgudi3282 Před 6 lety +3

    Thank you very very much for this video ..
    Also other videos ..
    You made my life easier with this .
    I successfully completed the project because of your videos .
    I hope you succeed in your life at every stage ..

  • @sauravdangol
    @sauravdangol Před 10 lety +3

    Thanks a lot. Helped me overcome this major obstacle

  • @manishlamichhane4592
    @manishlamichhane4592 Před 11 lety

    I was having problem in updating my db and this video helped me find out the reason...i didnt find it else where thankyou sir :)

  • @ProgrammingKnowledge
    @ProgrammingKnowledge  Před 12 lety +1

    see video no. 9 .......Java prog#9. Get value from JTable and set it to jtextfield in Netbeans Java and Sqlite (mysql)

  • @lucaspacheco883
    @lucaspacheco883 Před 8 lety

    Thx "Raj", good work!

  • @nefty420
    @nefty420 Před 10 lety

    Seriously. Thank you SO much!

  • @sherwinpadilla6299
    @sherwinpadilla6299 Před 10 lety +1

    Sir, may I just ask, how to view what I search and display it at jtable, tnx in advance.

  • @emilytheb820
    @emilytheb820 Před 10 lety +1

    Thank you so much .Perfect

  • @joodmohammed1958
    @joodmohammed1958 Před 3 lety

    Hi,
    Nice work.
    Could you please tell me how to add data to jTable using keyboard action and save to database using save button

  • @limkunze4159
    @limkunze4159 Před 11 lety

    hello, i want to ask that if i want to chance “empoyeeid" also how to make it?
    i have try and it show me "Updated" but actually the data didnt change anything.
    is it because of primary key? thanks

  • @chethanarasangi2001
    @chethanarasangi2001 Před měsícem

    Thank you so much. You saved me ❤

  • @FirhansMaulana
    @FirhansMaulana Před 6 lety

    how to update the date bro? where the first column use auto increment.

  • @donzrag1
    @donzrag1 Před 12 lety

    sir!! i want to know how to edit data row wise and how do u import table data into jTextfields !!plz plz let me know !! thanks in advance

  • @maheshreddy920
    @maheshreddy920 Před 11 lety

    When i updating the table. it exected and shows perfectly in the Jframe.. but those values are not updated in the actual database. plz help me out sir.

  • @Israel_597
    @Israel_597 Před 7 lety

    buena he gracias me salvaste !!!

  • @Myztyliz
    @Myztyliz Před 10 lety

    Hi Sir...I've tried this code but it is having an error to me...After Updating the jtable updated but when I checked my sqlite database the data values doesn't updated...plz help me with this...

  • @excuse98
    @excuse98 Před 11 lety +1

    how about in combobox not in textfields?

  • @kejvinluga
    @kejvinluga Před 2 lety

    Hello , can u help me , i want to update 3 table are same but diferent table name , how can i choose?

  • @akshaysatoskar7995
    @akshaysatoskar7995 Před 11 lety

    hey hello sir...can u plz tell us how to update date column which is in database?

  • @michaelklimov6620
    @michaelklimov6620 Před 10 lety

    same thing with me it only updates the jtable but sqlite is not updating....any solutions yet?

  • @user-oj4xf1rw8x
    @user-oj4xf1rw8x Před rokem

    You best the people in programming
    Im arabic

  • @monodeepsantra3358
    @monodeepsantra3358 Před 2 lety

    Thank you so much sir ☺️

  • @I-believe-in-humanity
    @I-believe-in-humanity Před 9 lety

    wow, u r genius

  • @AashishBharat
    @AashishBharat Před 11 lety

    Sir, how do i add a powerpoint presentation or video into netbeans..????

  • @bavenagopikrishnan6935

    thank you sooo much !!!

  • @Sanjay54251
    @Sanjay54251 Před 8 lety

    i am having general error please tell me what i do

  • @vishwajeetmallan6304
    @vishwajeetmallan6304 Před 6 lety

    U're amazing

  • @sherwinpadilla6299
    @sherwinpadilla6299 Před 10 lety

    my table is not updating even though I already a UpdateJtable, any other suggestion sir, tnx.

  • @RSJC_JOE
    @RSJC_JOE Před 9 lety

    ProgrammingKnowledge I didn't find the video where you have written the method update_table();

  • @shafaq8419
    @shafaq8419 Před 3 lety

    thanks so much !!

  • @piggfunny3677
    @piggfunny3677 Před 4 lety

    why the first value not changing but the other is ok
    Please help me to fix it 🙏🙏

  • @Patrickteodoro15
    @Patrickteodoro15 Před 8 lety +3

    im having an error at. pst = conn.preparedStatement;

    • @swatisharma3425
      @swatisharma3425 Před 2 lety +1

      Then you should use update quary() method instead of pst = conn. preparedStatement

  • @cnxcadde7217
    @cnxcadde7217 Před 4 lety

    Thanks

  • @1701032
    @1701032 Před 9 lety +5

    I tried updating the table but somehow everything got updated into the same variable

    • @xvAnnGvx
      @xvAnnGvx Před 8 lety

      +Bijukaku same sh*t. can't find the problem

    • @KegsProduction
      @KegsProduction Před 6 lety

      make a unique key that will serve as identification if what the specific you want to update

    • @jhongutierrez5255
      @jhongutierrez5255 Před 6 lety +1

      Kegs Production what do you mean sir? Unique key? How can i do that? Please sir i need it for my project

  • @mrsciencetv2526
    @mrsciencetv2526 Před 11 lety

    save and update dont work while delete work without erro
    please help me

  • @amalsathyan5530
    @amalsathyan5530 Před 3 lety

    Getting error a lock could not be found within the time request

  • @kautubh93
    @kautubh93 Před 10 lety +2

    i M trying to Update and delete the records its updating and deleting records from JTable BUT
    Its not Deleting Records From My Database..
    Help Me Out

  • @osamaamin2531
    @osamaamin2531 Před 6 lety

    thanks alott thanks thanks thanks

  • @klainmesh2
    @klainmesh2 Před 11 lety

    pst is error to me.. why is it?
    pst=conn.prepareStatement(sql);
    pst.execute();

  • @erickruanes1181
    @erickruanes1181 Před 7 lety

    thanks sir :)

  • @ScoutSniper
    @ScoutSniper Před 10 lety

    if you get an error when deleting try closing the connection

  • @imagenigraphics
    @imagenigraphics Před 5 lety

    is this still working?

  • @SIDDHARTH8925
    @SIDDHARTH8925 Před 10 lety

    i want to update date can any one plz help me out

  • @1978qwer2
    @1978qwer2 Před 11 lety

    thanks

  • @anjubora1111
    @anjubora1111 Před 6 lety

    pls tell us about your Update_table method. I cann't find your that video .

    • @KegsProduction
      @KegsProduction Před 6 lety

      the Update_Table is just the populate/refresh the table
      example:
      public void Update_table(){ //populate table of qoutation summary
      try
      {
      String sql = "Select * from tablenameinDB";
      pst = conn.prepareStatement(sql);
      rs = pst.executeQuery();
      tablename.setModel(DbUtils.resultSetToTableModel(rs));
      }

  • @CrunkKidd808
    @CrunkKidd808 Před 9 lety

    does this work on jdbc?

  • @microworksceo
    @microworksceo Před 11 lety

    me too, im not sure what is happening, i thought without quotes, but didnt help
    any ideas

  • @shishirahmed3095
    @shishirahmed3095 Před 8 lety +2

    i found a problem with primary key . solve : String sql="update Employeeinfo set employeeid='"+value1+"',name='"+value2+"',surname='"+value3+"',age='"+value4+"',username='"+value5+"',password='"+value6+"' where employeeid='"+value1+"'";

  • @AliDzakifikri
    @AliDzakifikri Před 7 měsíci

    how to update data on other page

  • @isacattanach762
    @isacattanach762 Před 9 lety

    I wish they'd post the code

  • @sibnathin428
    @sibnathin428 Před 6 lety

    what is pst?

  • @Azmodan86
    @Azmodan86 Před 9 lety +5

    For those having prblems that it updates all the items in the database i used the following code:
    try {
    int row = jTable1.getSelectedRow();
    String tableclick =(jTable1.getModel().getValueAt(row, 0).toString());
    String value1=jTextField1.getText();
    String value2=jTextField2.getText();
    String value4=jTextField4.getText();
    String value3=jTextField3.getText();
    String value5=jTextField5.getText();
    String sql ="update fumetti set sku='"+value1+"', nome='"+value2+"',prezzo='"+value4+"',uscita='"+value3+"',quantita='"+value5+"' where id ='"+tableclick+"'";
    pst=conn.prepareStatement(sql);
    pst.execute();
    JOptionPane.showMessageDialog(null, "Oggetto aggiornato");
    } catch (Exception e) {
    JOptionPane.showMessageDialog(null, e);
    }finally{
    try{
    pst.close();
    rs.close();
    }catch(Exception e){
    }
    }
    Update_Table();
    Hope it helps, i just added the
    int row = jTable1.getSelectedRow();
    String tableclick =(jTable1.getModel().getValueAt(row, 0).toString());
    and added in WHERE id ='"+tableclick+"'"; so it affects that item with the id selected in the table

    • @sainthaven15
      @sainthaven15 Před 8 lety

      +Azmodan86 It still updates all the same items

    • @Azmodan86
      @Azmodan86 Před 8 lety

      It worked for me mate...dunno why for you not. Can you post your code?

    • @xvAnnGvx
      @xvAnnGvx Před 8 lety

      +Azmodan86 thanx, it works!

    • @Azmodan86
      @Azmodan86 Před 8 lety

      ;-)

  • @nomikhan-st8bb
    @nomikhan-st8bb Před 9 lety


    i M trying to Update and delete the records its updating and deleting from jTable
    Its not changing From My sqdb..

    • @honglekhanh1865
      @honglekhanh1865 Před 9 lety

      Connection conn;
      ResultSet rs;
      PreparedStatement pst;
      don't initialize be "null"

    • @ErfanAhmed
      @ErfanAhmed Před 9 lety

      Hong Le Khanh
      it didn't work :/
      there is no change on sqlite database

    • @honglekhanh1865
      @honglekhanh1865 Před 9 lety

      Erfan Ahmed
      close connect
      finally {
      try {
      rs.close();
      pst.close();
      } catch (SQLException ex) {
      Logger.getLogger(Employee_info.class.getName()).log(Level.SEVERE, null, ex);
      }
      }

  • @kyamranahmed653
    @kyamranahmed653 Před 11 lety

    deleting und update funktioniert nicht so richtig.

  • @brainyrichards4537
    @brainyrichards4537 Před 7 lety

    String sql="update Employeeinfo set employeeid='"+value1+"', name='"+value2+"' where employeeid='"+value1+"' "
    pst = conn.preStatement(sql);
    pst.execute();
    please what does ( pst = conn.prepareStatement(sql); ) mean and what is its function????????
    again what does ( pst.execute(); ) mean????????????????
    Again i want you to get me a brief explanation of these two declarations and their use.
    ResultSet rs = null;
    PreparedStatement pst = null;

    • @thunder1kid
      @thunder1kid Před 7 lety +1

      PreparedStatement is like the command prompt for sql

  • @lananhtran8146
    @lananhtran8146 Před 8 lety

    how to jCalendar?

  • @sophayon6702
    @sophayon6702 Před 8 lety

    Help me

  • @donzrag1
    @donzrag1 Před 12 lety

    amd im using mysql

  • @jeanrodrigues6249
    @jeanrodrigues6249 Před 2 lety

    Value

  • @jeanrodrigues6249
    @jeanrodrigues6249 Před 2 lety

    Code

  • @user-oj4xf1rw8x
    @user-oj4xf1rw8x Před rokem

    Going to air