First of all, this is just a wonderful set of videos, I thank you so much.... Next, I was having the same error as a few below, and that is: java.sql.SQLException:[SQLITE_ERROR]SQL error or missing database (no such such table : EmployeeInfo )... what it turned out to be for me was pathing issue for my DB..... my DB "EmployeeData.sqlite"... lives in DIR x, however in dir x there is another dir that sqlite created called "docs".... there is another EmployeeData.sqlite there. That is the one I had defined in my sqliteConnection class.... and that is exactly why... I kept getting the Connection Successful message, yet I really was not connecting to my actual DB. I changed the path and bingo.... success... Good luck all.
Instead of using getText(), may be it is a bit useful to use String.valueOf( passwordField.getPassword()) or String PasswordTyped = new String(passwordField.getPassword()); Great tutorials, I really enjoy it...
[Solved] Like the others here I had the same error. Here's the solution: Let's keep in mind two things here. First he creates a database. He names it 'EmployeeData'. He then creates a table within that database. He names it 'EmployeeInfo'. In tutorials #3 and #4 (Data Connection) he gives connection to the 'database'. Its name is 'EmployeeData'. In tutorials #5 and #6 (Login Program with sqlite database) he sends the query to the 'table'. Its name is 'EmployeeInfo'. I got the error because I sent the query to 'EmployeeData' rather than to 'EmployeeInfo" when following this tutorial. It doesn't throw up errors anymore after I changed that. Gotta thank Ravish Kumar here in the comments section. His comment is what helped me realize my mistake.
Mostly good info but some bad practices shown here. Put the initial PreparedStatement pst = null; outside the try so you can close it in the finally. Same with the ResultSet rs. Always check for null before you try and close. Always, always, always close in a finally. In a single user standalone app in might not matter, but if you expect more than that, a failed query could prevent closing and, in the case of sqlite, lock you out of the database until everyone closes the app.
guys,java.lang.null pointerexception is resolved declare jtext field and jpassword field once in the class instead of twice at connection or at class level
Found a solution to { no such table }. If you followed this tutorial and chose to use a program like "DB Browser for SQLite", then you will have to click "Write Changes" which will save the handmade changes that you did to the database. Before you save it, the table which you created has not been saved to your directory and will not be found.
Hello ProgrammingKnowledge thank you so much for sharing your expertise with us all! Just tried the same steps, getting the secure connection though hitting this error thereafter: [java.sql.SQLException: not implemented by SQLite JDBC driver] please help!
[Solved] Like the others here I had the same error. Here's the solution: Let's keep in mind two things here. First he creates a database. He names it 'EmployeeData'. He then creates a table within that database. He names it 'EmployeeInfo'. In tutorials #3 and #4 (Data Connection) he gives connection to the 'database'. Its name is 'EmployeeData'. In tutorials #5 and #6 (Login Program with sqlite database) he sends the query to the 'table'. Its name is 'EmployeeInfo'. I got the error because I sent the query to 'EmployeeData' rather than to 'EmployeeInfo" when following this tutorial. It doesn't throw up errors anymore after I changed that. Gotta thank Ravish Kumar here in the comments section. His comment is what helped me realize my mistake.
At 9:57 (after your disconnect) you commented lines 95 and 96 (rs.close() and pst.close()), so because of that prg throws NullPointerException. May you tell me where i need to close all of three streams (connection, rs and pst)?
For the Null Pointer Exception I added in the try block "Connection conn = sqliteConnection.dbConnector(); PreparedStatement pst = conn.prepareStatement(query);".
[Solved] Like the others here I had the same error. Here's the solution: Let's keep in mind two things here. First he creates a database. He names it 'EmployeeData'. He then creates a table within that database. He names it 'EmployeeInfo'. In tutorials #3 and #4 (Data Connection) he gives connection to the 'database'. Its name is 'EmployeeData'. In tutorials #5 and #6 (Login Program with sqlite database) he sends the query to the 'table'. Its name is 'EmployeeInfo'. I got the error because I sent the query to 'EmployeeData' rather than to 'EmployeeInfo" when following this tutorial. It doesn't throw up errors anymore after I changed that. Gotta thank Ravish Kumar here in the comments section. His comment is what helped me realize my mistake.
if run program they always show username and pass word is not correct....why my program does not show any error...why will happen explain it ....please sir
hello sir,there is one problem , when i chick on the login button without entering any username & password then it will also login sucessfully where as username & password is empty bt it showing login sucssfully.Plz fix this problem.Hope u must reply me.
I've figured out the username and password both being correct but the app says they are incorrect error. Make sure when you make the count statement, to make it count = count + 1. Don't follow his advice to make the statement count = count++. Count would equal 0 and wouldn't be incremented when one tries to log in.
Thanks a lot, man. Your comment is the one that made me realize what I had to do to fix it. I've mistakenly credited to another dude here in the comments. Forgive me! Haha
I follow your step in doing the program but but i got some error like this ( java.sql.SQLException:[SQLITE_ERROR]SQL error or missing database (near"_";syntax error ? help me plss ...
[Solved] Like the others here I had the same error. Here's the solution: Let's keep in mind two things here. First he creates a database. He names it 'EmployeeData'. He then creates a table within that database. He names it 'EmployeeInfo'. In tutorials #3 and #4 (Data Connection) he gives connection to the 'database'. Its name is 'EmployeeData'. In tutorials #5 and #6 (Login Program with sqlite database) he sends the query to the 'table'. Its name is 'EmployeeInfo'. I got the error because I sent the query to 'EmployeeData' rather than to 'EmployeeInfo" when following this tutorial. It doesn't throw up errors anymore after I changed that. Gotta thank Ravish Kumar here in the comments section. His comment is what helped me realize my mistake.
First of all, this is just a wonderful set of videos, I thank you so much.... Next, I was having the same error as a few below, and that is: java.sql.SQLException:[SQLITE_ERROR]SQL error or missing database (no such such table : EmployeeInfo )...
what it turned out to be for me was pathing issue for my DB..... my DB "EmployeeData.sqlite"... lives in DIR x, however in dir x there is another dir that sqlite created called "docs".... there is another EmployeeData.sqlite there. That is the one I had defined in my sqliteConnection class.... and that is exactly why... I kept getting the Connection Successful message, yet I really was not connecting to my actual DB. I changed the path and bingo.... success... Good luck all.
Hi man, thank you! you saved my life
Instead of using getText(), may be it is a bit useful to use String.valueOf( passwordField.getPassword())
or String PasswordTyped = new String(passwordField.getPassword());
Great tutorials, I really enjoy it...
you're the best, still helpful today.
Great tutorials, just try to explain some concepts that could be new for some people trying to learn WindowBuilder. Keep making videos :D
[Solved]
Like the others here I had the same error. Here's the solution: Let's keep in mind two things here. First he creates a database. He names it 'EmployeeData'. He then creates a table within that database. He names it 'EmployeeInfo'. In tutorials #3 and #4 (Data Connection) he gives connection to the 'database'. Its name is 'EmployeeData'. In tutorials #5 and #6 (Login Program with sqlite database) he sends the query to the 'table'. Its name is 'EmployeeInfo'.
I got the error because I sent the query to 'EmployeeData' rather than to 'EmployeeInfo" when following this tutorial. It doesn't throw up errors anymore after I changed that.
Gotta thank Ravish Kumar here in the comments section. His comment is what helped me realize my mistake.
Thanks 👍👍
Thanks a lot for your understund lessons
Mostly good info but some bad practices shown here. Put the initial PreparedStatement pst = null; outside the try so you can close it in the finally. Same with the ResultSet rs. Always check for null before you try and close. Always, always, always close in a finally. In a single user standalone app in might not matter, but if you expect more than that, a failed query could prevent closing and, in the case of sqlite, lock you out of the database until everyone closes the app.
NotMyName how to resolve it ?
you are awesome!
thanks a lot sir
Thank you !!
guys,java.lang.null pointerexception is resolved declare jtext field and jpassword field once in the class instead of twice at connection or at class level
informative tutorial sir but i got error at null pointer exception at end can you guide me ?
thanks!
how do i get it work with .getPassword instead of .getText ? if i use getPassword i get errors about the getString.
Found a solution to { no such table }. If you followed this tutorial and chose to use a program like "DB Browser for SQLite", then you will have to click "Write Changes" which will save the handmade changes that you did to the database. Before you save it, the table which you created has not been saved to your directory and will not be found.
Hello ProgrammingKnowledge thank you so much for sharing your expertise with us all! Just tried the same steps, getting the secure connection though hitting this error thereafter: [java.sql.SQLException: not implemented by SQLite JDBC driver] please help!
[Solved]
Like the others here I had the same error. Here's the solution: Let's keep in mind two things here. First he creates a database. He names it 'EmployeeData'. He then creates a table within that database. He names it 'EmployeeInfo'. In tutorials #3 and #4 (Data Connection) he gives connection to the 'database'. Its name is 'EmployeeData'. In tutorials #5 and #6 (Login Program with sqlite database) he sends the query to the 'table'. Its name is 'EmployeeInfo'.
I got the error because I sent the query to 'EmployeeData' rather than to 'EmployeeInfo" when following this tutorial. It doesn't throw up errors anymore after I changed that.
Gotta thank Ravish Kumar here in the comments section. His comment is what helped me realize my mistake.
At 9:57 (after your disconnect) you commented lines 95 and 96 (rs.close() and pst.close()), so because of that prg throws NullPointerException. May you tell me where i need to close all of three streams (connection, rs and pst)?
LOL, The surname of first entry in Database is boner xD btw good tutorial :)
For the Null Pointer Exception I added in the try block "Connection conn = sqliteConnection.dbConnector(); PreparedStatement pst = conn.prepareStatement(query);".
It works. Thank you.
I followed every step but im getting java.nullpointer exception blabla. huhu/ why
[Solved]
Like the others here I had the same error. Here's the solution: Let's keep in mind two things here. First he creates a database. He names it 'EmployeeData'. He then creates a table within that database. He names it 'EmployeeInfo'. In tutorials #3 and #4 (Data Connection) he gives connection to the 'database'. Its name is 'EmployeeData'. In tutorials #5 and #6 (Login Program with sqlite database) he sends the query to the 'table'. Its name is 'EmployeeInfo'.
I got the error because I sent the query to 'EmployeeData' rather than to 'EmployeeInfo" when following this tutorial. It doesn't throw up errors anymore after I changed that.
Gotta thank Ravish Kumar here in the comments section. His comment is what helped me realize my mistake.
anyone can help me? i do all things of video and my program have a error
if run program they always show username and pass word is not correct....why my program does not show any error...why will happen explain it ....please sir
Ambesh Vishwakarma i also have same problem .Did u fix it
im getting java.lang.SQLException error pls help
when im clicking on Login button im getting this error java.lang.NullPointerExcepetion can you help me ? :/
+Argjend Bytyqi Did you ever figure out what's wrong? I have the same error.
+Iker Sanchez no man still and i didnt search anymore im working in something else but if i will find something ill tell you :)
Username and Password is always incorrect. I have a connection and the username and passwords are correct. What could the possible solution be?
did you ever find an answer?
James Sipowicz what error message are you getting?
Did u tell us how to mask the password?
He uses JPasswordField instead of JTextField.
hello sir,there is one problem , when i chick on the login button without entering any username & password then it will also login sucessfully where as username & password is empty bt it showing login sucssfully.Plz fix this problem.Hope u must reply me.
In my program, while(rs.next() ) loop isn't getting executed. Pls helpp
Sir, I done the same... but it's shows "java.lang.nullpointerexception"... how do I fix it???....hepl me
Use pst.setString(1,textFieldUN.getText().toLowerCase());
You need .toLowerCase(); for username.
+abdullayeff You do not need lowercase.
+XQuantumForceX object.equals("user","User") == false. So you need lowercase for username area.
I've figured out the username and password both being correct but the app says they are incorrect error. Make sure when you make the count statement, to make it count = count + 1. Don't follow his advice to make the statement count = count++. Count would equal 0 and wouldn't be incremented when one tries to log in.
Clicking for tutorial #9 I come to tutorial #6. Where did #9 go? Does anybody know?
I followed every step but i got null pointer exception how do I fix it ? I
I am facing arrayoutofbound exception
Can you post sqliteConnection.java please?
when i login i get this exception:
java.sql.SQLException:[SQLITE_ERROR]SQL error or missing database (no such such table : EmployeeInfo )
+Aditi Rajendran me too...any solution you have goted?
+vishal moradiya If you still need it, the solution for me was to use the name you gave to the table in sqlite not the file name
+Diego Chui what do you mean?
Thanks a lot, man. Your comment is the one that made me realize what I had to do to fix it. I've mistakenly credited to another dude here in the comments. Forgive me! Haha
I've followed the whole video and it keeps telling me that the username and password are wrong. I've tried like everything. any suggestions? Thank you
I follow your step in doing the program but but i got some error like this ( java.sql.SQLException:[SQLITE_ERROR]SQL error or missing database (near"_";syntax error ? help me plss ...
Please check ur table name ......beacuse i was facing the same errror there was a mistake in my table name speling.
i am getting "java.lang.ClassNotFoundException :org.sqlite.JDBC" can anyone help me
[Solved]
Like the others here I had the same error. Here's the solution: Let's keep in mind two things here. First he creates a database. He names it 'EmployeeData'. He then creates a table within that database. He names it 'EmployeeInfo'. In tutorials #3 and #4 (Data Connection) he gives connection to the 'database'. Its name is 'EmployeeData'. In tutorials #5 and #6 (Login Program with sqlite database) he sends the query to the 'table'. Its name is 'EmployeeInfo'.
I got the error because I sent the query to 'EmployeeData' rather than to 'EmployeeInfo" when following this tutorial. It doesn't throw up errors anymore after I changed that.
Gotta thank Ravish Kumar here in the comments section. His comment is what helped me realize my mistake.
Bro, thanks a ton! You helped me figure out why I was getting the error. Phew!
help me how to fix java.lang.NullPointerException ?? anyone??
I have followed your steps sir, but my wrong username and password is also shown as valid. Please help me.
have you found an answer?