Java prog#16.Deleting Data from an SQLite (MySql) Database in Netbeans java

Sdílet
Vložit
  • čas přidán 8. 05. 2012
  • -----------------Online Courses to learn---------------------------
    Java - bit.ly/2H6wqXk
    C++ - bit.ly/2q8VWl1
    AngularJS - bit.ly/2qebsLu
    Python - bit.ly/2Eq0VSt
    C- bit.ly/2HfZ6L8
    Android - bit.ly/2qaRSAS
    Linux - bit.ly/2IwOuqz
    AWS Certified Solutions Architect - bit.ly/2JrGoAF
    Modern React with Redux - bit.ly/2H6wDtA
    MySQL - bit.ly/2qcF63Z
    ---------------------Follow--------------------------------------------
    My Website - www.codebind.com
    My Blog - goo.gl/Nd2pFn
    My Facebook Page - goo.gl/eLp2cQ
    Google+ - goo.gl/lvC5FX
    Twitter - / programmingknow
    Pinterest - goo.gl/kCInUp
    Text Case Converter - goo.gl/pVpcwL
    ------------------------Stuff I use to make videos ------------------
    Stuff I use to make videos
    Windows notebook - amzn.to/2zcXPyF
    Apple MacBook Pro - amzn.to/2BTJBZ7
    Ubuntu notebook - amzn.to/2GE4giY
    Desktop - amzn.to/2zct252
    Microphone - amzn.to/2zcYbW1
    notebook mouse - amzn.to/2BVs4Q3
    -----------------Facebook Links ---------------------------------------
    ProgrammingKnowledgeLear...
    AndroidTutorialsForBegin...
    Programmingknowledge
    CppProgrammingLanguage
    JavaTutorialsAndCode
    SQLiteTutorial
    UbuntuLinuxTutorials
    EasyOnlineConverter
    netbeans java tutorial
    Deleting Data from an SQL Table in Netbeans java
    Deleting Data in a SQL Database in Netbeans java
    java netbeans and Mysql/SqLite (sql delete statement)
    remove Data in a SQL Database in Netbeans java
    iit Learn java netbeans
    java tutorial netbeans

Komentáře • 45

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

    got it :) and a lill help to those who are still straggling... Sting Sql="detele from Table_Name where column_name =?";
    try{ pst.conn.prepareStatement(sql);
    pst.setString(1, textField1.getText());
    pst.execute();
    UpdateTabble();
    pst.close(); //only close the pst
    }
    catch(){}

  • @ChauBacHo
    @ChauBacHo Před 4 lety

    still useful in 2019. Thanks a lot!

  • @rainyroad87
    @rainyroad87 Před 9 lety

    Thank you for the video, very helpful.

  • @lestonyearwood3160
    @lestonyearwood3160 Před 11 lety

    Followed everything to a T, and everything works thx :D

  • @EvansChikasa
    @EvansChikasa Před 9 lety

    I want to find out, whats the code i can use (in netbeans/java) to delete data in a relational database? i have two tables related by Customer ID. I want when the user enters customer ID and Ticket ID (A field in one of the tables) to have the data in the respective tables deleted.

  • @dekij86
    @dekij86 Před 11 lety

    Hhank you, you helped me a lot

  • @kennethdapat8652
    @kennethdapat8652 Před 11 lety

    Thanks for the tutorial.
    Just follow his instruction and
    Try putting this #1 :in the Table_EmployeeMouseClicked method.
    #1 finally { try {rs.close(); pst.close();}catch(Exception e){}}

  • @KhairulAzmi21
    @KhairulAzmi21 Před 11 lety

    yeah It works . Thanks buddy !

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

    Mmmm did exactly the same things but i get the error "unable to open database file"

  • @DanamKo
    @DanamKo Před 12 lety

    thanks for your help really ! And i have a question how can i add Row to JTable automatically ?

  • @ScoutSniper
    @ScoutSniper Před 10 lety

    i don't get any error on the delete button and no data is being deleted. how come yours works yet you didn't close the pst and the rs? please help

  • @ProgrammingKnowledge
    @ProgrammingKnowledge  Před 12 lety

    close ur database and open it once again. or refresh ur database . I think the problem will be solved.

  • @boffiee
    @boffiee Před 10 lety

    What is PST.conn etc???
    Is it a imported class or is it a variable?????

  • @mahmoudrebhi7427
    @mahmoudrebhi7427 Před 3 lety

    thancs for you DR

  • @cheemunping2709
    @cheemunping2709 Před 11 lety

    Thank Q REYAN PAPA~ It works ^^

  • @stanezzz
    @stanezzz Před 9 lety +2

    i wonder what you have inside that update ()

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

    i having the same problem...my data is not deleted yet...n i a refresh my database...but is still appear...wat should i do?

  • @trisetyadarmawan902
    @trisetyadarmawan902 Před 8 lety

    Thanks :)

  • @Bayans89
    @Bayans89 Před 12 lety

    thanks alot god bess you

  • @295rezasaputra4
    @295rezasaputra4 Před 3 lety

    Terima kasih :)

  • @sheikh5304
    @sheikh5304 Před 7 lety

    also want to delete name and age then how we write it in string?

  • @zephirusvideos
    @zephirusvideos Před 12 lety

    Thanks. The problem was that I didn't close my connection with the "finally" code after the "try... catch". But it's strange that the save and everything else worked well... Anyway, problem solved!

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

    hello,.
    my data on DB are not delete.i tried to refresh DB and close DB and open again. , but it 's not work..
    what to do now..

  • @5855mohsin
    @5855mohsin Před 11 lety

    But i Request you to please Explain the COMMANDS also so people can understand the working.

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

    Yeah me too my data is not deleted in sqlite Database i tried refreshing and reopening but the problem insist

  • @wahyuditsai9890
    @wahyuditsai9890 Před 11 lety

    Please help me, i need it urgently
    when press to table, how to make it come out on the text field ? the code did not shown...please help

  • @saranakkach9252
    @saranakkach9252 Před 11 lety

    I have a question plz , when i add the code of delete data it show me an exception said database locked i think i did exactly as u have done and u didnt have this problem ? what did i Miss plz plz its very urgent

  • @patrickoduro5638
    @patrickoduro5638 Před 12 lety

    Thanks soo much.But i can't still delete from my sql database.I have refreshed database and checked and data still remains.The same applies to my "update" button.Thanks soo much and hope to hear from you soon.

  • @ikhsanfahrurrizal9940
    @ikhsanfahrurrizal9940 Před 10 lety

    Sir, what is PST ? and which video i can see Pst ?

  • @zephirusvideos
    @zephirusvideos Před 12 lety

    My data is not deleted. Do you have any ideia why? My code is exactly as yours...

  • @5855mohsin
    @5855mohsin Před 11 lety

    Thanks brother for your Tutorials.
    Brother , I made a program same as yours 16th tutorial, but my jTable's only one row is Deleted. After one row, no row is deleted.
    String sql = "delete from customer_info where cus_id = ?";
    try{
    pst = conn.prepareStatement(sql);
    pst.setString(1, cid_txt.getText());
    pst.execute();
    JOptionPane.showMessageDialog(null, "Data Deleted");
    }
    catch(Exception e){
    JOptionPane.showMessageDialog(null, e);
    }
    Update_table();

  • @Tomahoop
    @Tomahoop Před 6 lety

    My table doesn't delete them, help

  • @97leDjo
    @97leDjo Před 11 lety

    No it doesn't.... If I delete data from table it will only be deleted in the table not in the database.... I have that problem please help...

  • @reyanpapa1178
    @reyanpapa1178 Před 11 lety

    Hi guys try to add after catch
    finally{
    try{
    ps.close();
    rs.close();
    }catch(Exception e){
    }
    }
    it works in my program. Hope it hepls

  • @aminagrebi
    @aminagrebi Před 11 lety

    plz i have a question, if i opned this program its works deleted but the data is not deleted inside the sqlite, why?

  • @mariannakowalska1583
    @mariannakowalska1583 Před 10 lety

    java.lang.nullpointerexception :( What's wrong?

    • @Azmodan86
      @Azmodan86 Před 9 lety

      Same here...can't figure it out. Did u find out?

  • @donaldstutorials118
    @donaldstutorials118 Před 5 lety

    Hey everyone, I made a short 3 minute tutorial that covers how to update and delete data in a database using Java. Check it out here: czcams.com/video/NPYj9Z5k1kY/video.html