Java prog#20.How to search a particular data in SQLite (MySql) Database in Netbeans java jtable
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
THANK YOU SO MUCH! your videos are always so straightforward and they pretty much always work :))
this is very specific and exact.
thank you
Thank you so much for your help, I really appreciate it
see video no 55. How to Login by pressing Enter Key or Jbutton or both in java netbeans
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() + "%");
thanks very very much , i had very difficult for again this code thanks once again for you man
very helpful, thanks!
Great tutorial, thank you.
man I have to salute you
you are doing a good job with this tutorial
see my first video................
Thank You !!!
Ty
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?
thank you sir
thanks :)
hi thank you alot can i ask you please how to make the log in botton works when you press enter ?
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
how about if i will getstring and put it in the combobox ?how can i do it?
by me he gives a cannot find symbol pst and by rs error. how can i fix this without breaking the code :/
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);
}
}
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
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
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 ?
does this work with oracle...
How to populate for components like Radio button, Check box ,Combo box for searched Item ?.. pl anybody
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..
How about if you searching for an employee who is not in the database
pls do a video about filter data
preparedstatement
the problem is i dont know where to put the % since i used the LIKE condition here. thanks in advance.
how to capture the screen as video..is any free tools
pst = PreparedStatement
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
that means you havent connected your java file to your database using your connection method
can i have the link of your first video
can't fint it.
The search is not working. I checked the code, its correct. Where could I be wrong??
Good Day sir. Im having an error and it says java.lang.NullPointerException can you please help me sir?
I had also experienced the same error ..check whether in your Constructor ,you have called the connection method i.e
con = dbConnect.connect();
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.
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.
they are in the next tutorial
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
you write a wrong query in that method
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
what code is behind pst,rs and conn variables?
Lol thanks but you're a bit delayed on the comment😁
Sir i want to ask, in your code, you have a "PST", what it's Sir ?
static PreparedStatement
PreparedStatement pst = null;
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
have you created a field for it in your database?
What if there is same data, name, surname, more than one time?
use a uniq key for search
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 :)
Hey Sir. Can I ask?
.setString is my problem
resultset
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
see my first video................