Java prog#17.How to update/Edit a data in SQLite (MySql) Database in Netbeans java
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
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 ..
Thanks a lot. Helped me overcome this major obstacle
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 :)
see video no. 9 .......Java prog#9. Get value from JTable and set it to jtextfield in Netbeans Java and Sqlite (mysql)
Thx "Raj", good work!
Seriously. Thank you SO much!
Sir, may I just ask, how to view what I search and display it at jtable, tnx in advance.
Thank you so much .Perfect
Hi,
Nice work.
Could you please tell me how to add data to jTable using keyboard action and save to database using save button
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
Thank you so much. You saved me ❤
how to update the date bro? where the first column use auto increment.
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
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.
buena he gracias me salvaste !!!
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...
how about in combobox not in textfields?
Hello , can u help me , i want to update 3 table are same but diferent table name , how can i choose?
hey hello sir...can u plz tell us how to update date column which is in database?
same thing with me it only updates the jtable but sqlite is not updating....any solutions yet?
You best the people in programming
Im arabic
Thank you so much sir ☺️
wow, u r genius
Sir, how do i add a powerpoint presentation or video into netbeans..????
thank you sooo much !!!
i am having general error please tell me what i do
U're amazing
my table is not updating even though I already a UpdateJtable, any other suggestion sir, tnx.
ProgrammingKnowledge I didn't find the video where you have written the method update_table();
thanks so much !!
why the first value not changing but the other is ok
Please help me to fix it 🙏🙏
im having an error at. pst = conn.preparedStatement;
Then you should use update quary() method instead of pst = conn. preparedStatement
Thanks
I tried updating the table but somehow everything got updated into the same variable
+Bijukaku same sh*t. can't find the problem
make a unique key that will serve as identification if what the specific you want to update
Kegs Production what do you mean sir? Unique key? How can i do that? Please sir i need it for my project
save and update dont work while delete work without erro
please help me
Getting error a lock could not be found within the time request
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
i have the same problem
i have also the same problem
if anyone find the solution plzzz comment ..
nomi khan
me too !!
you have already primary key ?
thanks alott thanks thanks thanks
pst is error to me.. why is it?
pst=conn.prepareStatement(sql);
pst.execute();
thanks sir :)
if you get an error when deleting try closing the connection
is this still working?
i want to update date can any one plz help me out
thanks
pls tell us about your Update_table method. I cann't find your that video .
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));
}
does this work on jdbc?
Yes.
me too, im not sure what is happening, i thought without quotes, but didnt help
any ideas
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+"'";
Thanks man, I had the same issue!
Thank u sir❤️
how to update data on other page
I wish they'd post the code
what is pst?
PreparedStatement pst;
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
+Azmodan86 It still updates all the same items
It worked for me mate...dunno why for you not. Can you post your code?
+Azmodan86 thanx, it works!
;-)
i M trying to Update and delete the records its updating and deleting from jTable
Its not changing From My sqdb..
Connection conn;
ResultSet rs;
PreparedStatement pst;
don't initialize be "null"
Hong Le Khanh
it didn't work :/
there is no change on sqlite database
Erfan Ahmed
close connect
finally {
try {
rs.close();
pst.close();
} catch (SQLException ex) {
Logger.getLogger(Employee_info.class.getName()).log(Level.SEVERE, null, ex);
}
}
deleting und update funktioniert nicht so richtig.
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;
PreparedStatement is like the command prompt for sql
how to jCalendar?
use javaFX
Help me
amd im using mysql
Value
Code
Going to air