Java prog#14.How to Insert/Save data from netbeans java into database Sqlite (MySql)
Vložit
- čas přidán 26. 07. 2024
- ★★★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!
netbeans java tutorial
how to insert data from netbeans into database
Insert information into a MySQL database - NetBeans - Java
Insert Data Into Mysql Database Using Netbeans
Insert Data Of Textfields In Database "netbeans"
Insert Data Into Database Using Netbeans
to insert, update and delete new data into mysql database using jbutton.
How to insert data into database
how to insert java.sql.data into database
sql - Java Date - Insert into database
How to Insert Data into a table in mysql database
insert values in table,JDBC Insert Row
JDBC program to insert data into mysql database from java netbeans
iit Learn java netbeans
java tutorial netbeans
I think u have directly seen this video.....please first 4 videos in which i have shown how to make a connection with the database e.g sql ...pst=conn........is the connection statement so u first need to establish connection with database ......please see first 4 videos and if any doubt then ask me................
you explain things simply and it helps us to understand the concepts quiet easily...Thanks for all your effort...keep it up Sir,,,
thank you very much! Its because of your channel i created my netbeans project
thank you so mutch... just what i was looking for... ;)
can u show me ur code .are u using arrey.......your trying to access an array index that is outside the bounds of its size.
When i am inserting data into my table it is showing exception that (sql query does not return result).... please help me solving this
pst =conn.prepareStatement(sql);
do i have to import anything for this line to work?
same question
import java.sql.*;
PreparedStatement pst = conn.prepareStatement(sql);
I ran into this problem doing some testing. You problem is when you set your Strings, with the indexes you are using.
I'm trying to figure out where the connectivity is, you know, where do I used the JDBC .
Allot of Thanks brother for this reply. i will always subscribe your channel. thanks again.
Hey I have this error: cannot find symbol - method setString(int,java.lang.String)
Do I need a library or something?
Could you help me pleeeease?
Thanks it helps me lot...
thank you very much for your help .
Hello sir..i realy like your all the videos. its whery use full for me. pls tell me how to JText box OnClick event to remove default data
ok thnk u!!! this really help me!!!
Hi, im trying to save my data in the table but each time i close the window i loos the data and i have to rewrite the data again! Is there any way to save the data with out connect my project to sqlite? All what i want is to save into my pc?
hello, can you help me?, My lecturer asked a project about online quiz application, which is users need to download the contents (questions) before use it, and click done after finish, if the internet problem occur, the answer can still be sent but need to wait until the internet is ready, admin check the result at the end. I don't want to use html since troubles occur when internet down.
it's cooooooooool..thanks.it was really helped
at 04:28, you wrote "pst=conn...." what do they refer to?
same problem :/
PreparedStatement pst = conn.prepareStatement(sql);
hello!! i just want to ask if i need to save data without connecting with mysql..can i do that.. is yes..i hope u will update your new video.
thanks for this video it help me to cover my assignment..
hello! i have an error when i clicked save button its Show "java.lang.NullPointerExeption" can you help me to fix this. thank you.
I would like to thank you for What your are doing we really appreciate you Tuts.
I also would like to ask you something.
"I have three tables in my DataBase, and I have a jcombobox of 3 Items( Name, Age, job).
I want to update each table if each respective Items is selected."
example: if I select in the Combobox Name may only name's Table should be updated.
you can use dispose() method to close the window!
which database s/w u used dor saving data
did you use main method in this program my code doesn't work because of main method is missing
thanks your work is very very good
please help me when i run the program displays :Query does not return results
Hi, Your videos are really helpful. I have some doubts here. I see that insert records shows up in my JTable, but doesn't show up in the Sqlite database. How is that possible.
you haven't connected your jtable to your database then.have you installed mysqlite on your system?
Good evening Sir .Pls can u do a video on how to delete multiple rows from a jtable database from SQLite
I get erro of this :
java.sql.sqlexception sqlite does not support stored procedures
How to fix this.???
Hello, could you please advice me on this. I am trying to design a GUI that will be able to update and retrieve filtered information from my SQL server connected to a network.
I would be glad if you can recommend a specific video for me because I am a little bit confused on which would be best (Ecclipse or netbeans). Please kindly pardon me if the question is a little trivial because I am very new to Java programming and this is my very first project.
Much better if you are going to use netbeans
Do you have this in GUI? or Java Swing?
what is the pst and Conn where u declare this variable or object in this tutorila plzz reply...
pst is the variable name pf password field
and conn also... may be he did pre-define this....
how to can i store string array or vector to database , and how can i retrieve those data from database can you please help me...
for ex. from Jlist i am selecting multiple string, suppose (here 4 different string) and how to store those 4 string in to database.
can i use this for javafx too?
For the line:
pst=conn.prepareStatement(sql);
I am getting cannot find symbol
Do I need to import packages & if so which ones? (I tried import java.sql.*; but that didn't help)
Thanks for this vid :)
or do I need to declare the variable pst somewhere?
Nick Kirby you have to declare it PreparedStatement pst = null; on the public class you have on your code
Jelal Stuinson what do you mean by that? i have this: PreparedStatement pst=conn.prepareStatement(sql);
it gives me shit for that "sql" there. any ideas? thanks a lot
+André Eleuterio String sql= ("//SQL QUERY//");
it works...thanx :)
Please how i can use the function Update_table ?!
java.sql.SQLException:[SQLITE_MISMATCH] Dtata Type mismatch(datatype mismatch)
when i click on save....then this error comes....what should i do now? :\
please help
Thanks :)
I am getting this error :- java.lang.nullpointerexception ,How should I fix this.
Please help me to resolve this "java.sql Exception:Query does not return result"
Can you help me please? ;( When i click on Save button i get the error java.lang.ArrayIndexOutOfBoundsException: 5
SIR can you show us how to add,edit,delete with a auto increment in database????
im getting a java.lang.NullPointerException, waht should i do with this
it means you database is not connected to your form.you need to create a java.connect class,specify your connection there,and declare the variables n functions in your form to get rid of this error.I could send you the code if you want.
can you send me the code at hazwanirr@gmail.com? thank you.
hello hazwani, watch the video from 1 to 5.he generated the code within these videos.i could send you the code but u will still need to customize it to suite ur environment.
can you please send me the code its very urgent....
tasnim40@diit.info
@@mosesegboh me too marcricolimhernandez@gmail.com
pst and conn problem...how to fix
have you declared you java.connect class?
it's good can you tel me the jdbc connection statement in this video
dasdasdwwwd
hi, i am trying to this, but dnt know y PST = con is being underlined red. can u help me. thnx
" java.sql.SQLException: Constraint failed " .. I'm getting this error .. help please
sir, When i tried save button i show an exception which is "Query does not return results"
pls help me
HI , 1229shakirali just watch the next vedio .......If any doubt then ask me
how i can solve error in this line "conn"???
pst=conn.prepareStatement(sql);
have you declared the variable "conn" in your program?
where you declares the conn and pst ?? in mysql connection ?? Connection conn & statement pst ??
got it thanks
awesome
Please show the us that , how can you set date and time ?
I am getting java.sql.SQLException: query does not return results. I also established connection and followed all the steps in previous videos but I cannot get rid of this error please help me ragarding this
I got the solution for my problem, I was using executeQuery function intstead of Execute() one.
Shree-kul Kalyan-kar I had same problem :)
pst.setString does not work, it says not found
if i use phpmyadmin, is it the same way as in the video??
yes it will,just a little difference in the connection code
on the codes where does "pst" come from? cause i tried to do this program and it gave me errors
pst is is a variable for prepared statement he declared in the beginning of the program.I think its an sql stuff.If you follow the video carefully you will see where it was declared at the creation of the class before the constructor.If you are still having issues you can contact me i will help you out.
have you made the java.connect class?
am happy i could help.take care now
Dear how to open another form by click a jButton ?
Let me know the video before this , i could not find it..pls..
what pst mean ?
org.sqlite.Stmt cannot be cast to com.mysql.jdbc.PreparedStatement
how to solve this error
org.sqlite.PrepStmt cannot be cast to com.mysql.jdbc.PreparedStatement
and like this error
java.sql.SQLException: [Microsoft][ODBC Microsoft Acces Driver] Syntax error in INSERT statement. I USE MICROSOFT ACCESS what's wrong i followed your code. but when i click save this shows up
what if the user input a number in surname? how can i trapped it?
how to get only one column in jtable like only name all records ? help me
edit it from your sql statement,instead of using select "'*",you should use select "name" in your sql statment. hope you understand
got an error "
java.lang.NullPointerException".....
help me ......thanks in advance
i did get your code but still can you give me the all of the codes you inserted inside please
how about no duplicate id or username?
hello my brother ,, can you help me for insert multiple row from netbeans to database . thank you for answer
you can do that,all you need to do is duplicate your handling code and make some necessary changes
thnak you for answered
so I qustioned for tell me how to insert multiple row , im cannot this changes your tell me
can you help me by create video ,, thnak you , thank you very much
sorry if my languge has an error
Zial Zia, The Problem is occurring in the insertion because the key is auto increment for this solution then use this code below into your action with the name of your variables.
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
try {
String sql = "Insert into Empoyeeinfo (name,surname,age)"
+ " values (?,?,?);";
pst = conn.prepareStatement(sql);
//pst.setString(1, jTextField1.getText());
pst.setString(1, jTextField2.getText());
pst.setString(2, jTextField3.getText());
pst.setString(3, jTextField4.getText());
pst.execute();
JOptionPane.showMessageDialog(null, "SALVO COM SUCESSO");
} catch (Exception ex) {
JOptionPane.showMessageDialog(null, ex);
}
Update_table();
}
Evandro Rodrigues de Andrade thank you, your comment very helpful for me)
Thanx it works :)
Thank you, but now show pop up "database locked"
I guess you've not provided the URL of database
The problem disappeared after i restarted the program.But i have a new one java.sql.SQLException: Unrecognized token. Can you give me your e-mail, so i can explain a bit more abaut my problem to you and post you my project?
please any one tell me
what is pst and conn?
How can you remove data from the database sqlite with Netbeans java?
ERROR: java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 2.
this is the error when i click register button to insert the data into database
java.sql.SQLException:unable to open database file this is the error please help me
Where the pst came from?
why are the values (?,?) ?
query doesnt return result where could i be wrong
check the syntax of your query very well,there is something you are missing.I encountered that same problem but solved it
got an error " java.lang.NullPointerException"
Hi,
you are getting this Null Pointer exception ,because u must be closing the connection before all use.
and as far as i know u might be using finally block to close the connection.
But this is not the right way..
close the connection " WHEN U HAVE ALL DONE WITH UR CONNECTIONS".
Remove it from finally block ,and set it in the last(i.e all the condition u have given) condition (i.e last if block) .
you need a table first isnt it?
Can I have the code to create the table
you can create a table by dragging and dropping a table item from the palette under swing controls.then for you to connect the able to the database,you will need to create a java.connect class first of all and write necessary code before can connect your table to the database.
anand kokatnur indiano
plz i want the code of méthode Update_table thx
sql exception sqlite readonly
Omg this video is all over the place. It makes me motion sick.
Close
Se
video was not helpful....