Java prog#20.How to search a particular data in SQLite (MySql) Database in Netbeans java jtable

Sdílet
Vložit
  • čas přidán 9. 07. 2024
  • -----------------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
    How to search a particular data in java netbeans table
    MySQL and NetBeans Search Button
    netbeans java tutorial
    Java & MySQL Searching your database NetBeans
    Retrieving database records using netbeans
    How to search a particular data in java netbeans table
    netbeans search data from database
    iit Learn java netbeans
    java tutorial netbeans

Komentáře • 61

  • @anushkasaini9231
    @anushkasaini9231 Před 6 lety

    THANK YOU SO MUCH! your videos are always so straightforward and they pretty much always work :))

  • @tunisiasparx2105
    @tunisiasparx2105 Před 5 lety

    this is very specific and exact.
    thank you

  • @ahmadq8109
    @ahmadq8109 Před 6 lety

    Thank you so much for your help, I really appreciate it

  • @ProgrammingKnowledge
    @ProgrammingKnowledge  Před 12 lety

    see video no 55. How to Login by pressing Enter Key or Jbutton or both in java netbeans

  • @santosps2
    @santosps2 Před 8 lety +5

    Hi, you can use a global match for search:
    String sql = "select * from employee where name Like ?";
    pst= conn.prepareStatement(sql);
    pst.setString(1, "%" + txt_search.getText() + "%");

    • @ahmedyoussef7968
      @ahmedyoussef7968 Před 7 lety

      thanks very very much , i had very difficult for again this code thanks once again for you man

  • @PossessWithin
    @PossessWithin Před 9 lety

    very helpful, thanks!

  • @atanatirosgiliat954
    @atanatirosgiliat954 Před 11 lety

    Great tutorial, thank you.

  • @yousseffatih7342
    @yousseffatih7342 Před 11 lety

    man I have to salute you
    you are doing a good job with this tutorial

  • @ProgrammingKnowledge
    @ProgrammingKnowledge  Před 12 lety

    see my first video................

  • @chamilsamaranayaka6412

    Thank You !!!

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

    Ty

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

    What if there were two persons in the database with the same name and the jtextfield shows only the first person. Is there a was to get the next person to be shown in the textfield?

  • @ajinath2151
    @ajinath2151 Před 6 lety

    thank you sir

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

    thanks :)

  • @Bayans89
    @Bayans89 Před 12 lety

    hi thank you alot can i ask you please how to make the log in botton works when you press enter ?

  • @manohartimothy5825
    @manohartimothy5825 Před 2 lety

    It was very helpful and I really appriciate it .... can we also use a combobox to get all the names iside and choose to search it... Tahnk you so much...Manohar

  • @excuse98
    @excuse98 Před 11 lety

    how about if i will getstring and put it in the combobox ?how can i do it?

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

    by me he gives a cannot find symbol pst and by rs error. how can i fix this without breaking the code :/

  • @kennethdapat8652
    @kennethdapat8652 Před 11 lety

    Nice guide. So i try to modify your code and come up with these:
    private void txt_search_employeeKeyReleased(java.awt.event.KeyEvent evt) { String val1 = txt_search_employee.getText();
    try { String sql = "select id, name, department, postion from employeeinfo where name like '" + val1 + "'";
    pst = conn.prepareStatement(sql);
    rs = pst.executeQuery();
    table_employee_info.setModel(DbUtils.resultSetToTableModel(rs));
    } catch (Exception e) {
    JOptionPane.showMessageDialog(null, e);
    }
    }

  • @miamipam100
    @miamipam100 Před 11 lety

    Hey I want to search data using the column ID in ms access but using your method it gives me an exception saying datatype mismatch criteria
    where am I going wrong

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

    please give a video tutorial of collecting data from two different tables ,,like from table 1 we fetch customer name and from second table suppose he buy something and we fetchout that detail. as soon as possible

  • @princetroy4731
    @princetroy4731 Před 11 lety

    sir , what if the program is not connected in database ? cuz i have a project like that . it needs to search data in the table // but it is not connected in the mysql , can u help me to seach data in the table ? using jTextfield and jButton to Search ?

  • @beni2086
    @beni2086 Před 11 lety

    does this work with oracle...

  • @LalGebi
    @LalGebi Před 6 lety

    How to populate for components like Radio button, Check box ,Combo box for searched Item ?.. pl anybody

  • @AtmosphereAnimated
    @AtmosphereAnimated Před 11 lety

    while running the file i m getting a null pointer exception after every word i enter in search textfield.. could you please provide a solution for it..

  • @bonganinkwanyana7569
    @bonganinkwanyana7569 Před 5 lety

    How about if you searching for an employee who is not in the database

  • @wijith7
    @wijith7 Před 7 lety

    pls do a video about filter data

  • @varun513
    @varun513 Před 11 lety

    preparedstatement

  • @kennethdapat8652
    @kennethdapat8652 Před 11 lety

    the problem is i dont know where to put the % since i used the LIKE condition here. thanks in advance.

  • @AbeyEMathews
    @AbeyEMathews Před 10 lety

    how to capture the screen as video..is any free tools

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

    pst = PreparedStatement

  • @JunLee000
    @JunLee000 Před 9 lety

    Please Help. .I already follow every instruction from this video including keyreleased the txtfield search . but when press a single letter this dialog box shows up . . java.lang,NullPointerException . .please help

    • @mosesegboh
      @mosesegboh Před 7 lety

      that means you havent connected your java file to your database using your connection method

  • @MrLawrence013
    @MrLawrence013 Před 11 lety

    can i have the link of your first video
    can't fint it.

  • @torrtuganooh2484
    @torrtuganooh2484 Před 9 lety

    The search is not working. I checked the code, its correct. Where could I be wrong??

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

    Good Day sir. Im having an error and it says java.lang.NullPointerException can you please help me sir?

    • @melvinkimathi8924
      @melvinkimathi8924 Před 4 lety

      I had also experienced the same error ..check whether in your Constructor ,you have called the connection method i.e
      con = dbConnect.connect();

  • @lqp2792
    @lqp2792 Před 11 lety

    i have a problem. with KeyReleased Event on Search JTextField. when i type one word then JOptionPane apear, and ..... Help me pls, sorry for my bad English.

  • @astiginko
    @astiginko Před 4 lety

    What if i want to search with other details too for example : last name, age etc then it will show up too not just the name.

  • @usmanmani117
    @usmanmani117 Před 7 lety

    sir i ask you sir i have enter all data in database from 1 jframe and then i want to search according to your method from 2nd jfram then they give this error from meaagae box is sql error or missing database {near "Num".syntex error. please give me the solution fast

  • @balrajkumar7730
    @balrajkumar7730 Před 11 lety

    super and thax for this video, can i get the source code.
    i'm doing by notepad so MY REQUIREMENT IS GENERATING REPORTS..WITHOUT USING NETBEANS can u plz do SIR..very thx for this

  • @marcellpather3722
    @marcellpather3722 Před 7 lety

    what code is behind pst,rs and conn variables?

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

    Sir i want to ask, in your code, you have a "PST", what it's Sir ?

  • @brandonornelas7861
    @brandonornelas7861 Před 8 lety

    I need your help, i´m trying to do it but I´ve a mistake. When I write the sentence: stmt.setString(1, bus.getText()); this have a mistake, and its not working.
    And says this phrase: cannot find symbol
    My database is into netbeans

    • @mosesegboh
      @mosesegboh Před 7 lety

      have you created a field for it in your database?

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

    What if there is same data, name, surname, more than one time?

  • @ChaminNalinda
    @ChaminNalinda Před 12 lety

    can you enhance the performance of this search option where it doesn't count white space characters in searching
    eg: in my data base there's a name in name colum , name : Apple , ( there is a white space at the beggiining ) in such circumstacne this search doesn't occure
    glad if u could come up with a solution for this
    Many Thanks
    from Sri Lanka :)

  • @hashtagnewbie3154
    @hashtagnewbie3154 Před 10 lety

    Hey Sir. Can I ask?

  • @merikurisolee9785
    @merikurisolee9785 Před 7 lety

    .setString is my problem

  • @varun513
    @varun513 Před 11 lety

    resultset

  • @paNic23100
    @paNic23100 Před 11 lety

    This isn't working for me!
    It just clears all fields... PLEASE post source code so i can see bigger picture or at least directly copy paste code.
    Please man

  • @ProgrammingKnowledge
    @ProgrammingKnowledge  Před 12 lety

    see my first video................