Java Eclipse GUI Tutorial 4 # Database Connection ( Sqlite ) to Java Part 2 of 2

preview_player
Показать описание
SQLite JDBC Driver

★★★Top Online Courses From ProgrammingKnowledge ★★★

★★★ Online Courses to learn ★★★

★★★ Follow ★★★

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!

SQLite Java Tutorial
How to connect SQLite with Java?
Java JDBC using SQLite/Connecting
java - Connect to SQLite database
SQLite JDBC for Windows
android database connection sqlite
sqlite database connection string
android sqlite database connection code
java netbeans and MySQL or SQLite connecting to database
Connecting to a MySQL Database in Java
connecting to a database with java code
Database Programming with JDBC and Java
Trying to connect to mysql database via JDBC
Connect to MySQL database from Java
What is Jdbc and how you connect Java with database
Рекомендации по теме
Комментарии
Автор

For those who can't run the program, this one worked for me.

1. not all libraries are mandatory, i used 3.7.15-SNAPSHOT-2
2.also put the database into ur java workspace,

it runs for me..

aditirajendran
Автор

Thanks for the tutorial.

I used to get an SQLException error message and I fixed it this way:

1. Move your database file (mydatabase.db, mydatabase.sqlite or whatever is called) to your ecplise workspace's main folder
(in my case the database will be located to

2. Modify (in class sqliteConnection) your DriverManager.getConnection argument accordingly. In my case:
Connection conn =

3. Run



Also, you don't need ALL the .jar files.
You can simply download the latest one (for me it was sqlite-jdbc-3.23.1)

michaelvigato
Автор

For people getting "the system cannot find the path specified" error this is what I did:

This is my path
but whenever I would copy and paste this path elsewhere in quotes I would get this:



So I literally opened a text file and manually copied the file path there in hopes of cleaning up the invisible characters and pasted that back in my code.
This solution worked for me after hours of looking for a solution :)
Hope this helps

rivalz
Автор

You can download only sqlite-jdbc-3.8.7.jar Then right click on JRE System Library->Build Path->Configure Build Path and press "Add External JAR's".
But video is stil great. Thanks.

DainiusDainius
Автор

Uh... Add one jar file is totally enough, I've added this: sqlite-jdbc-3.8.7.jar

MondaySurprise
Автор

You could also have clicked the "Add External JARs" button and done the same thing. That would have allowed you to browse to the location of the SQLite JAR file, and it would then have been added. You didn't need to go to the trouble of creating a Resources directory and copying over all those JAR files.

bluehornet
Автор

Very beneficial, i have started from first... one thing i cal tell here is that you don't have to add all the JAR files. you just add the latest version of JAR ...

ramnarayanpatro
Автор

Thank you. After 2 tries, my connection was successful.

NeSsBeZz
Автор

Great tutorial. Very easy to follow and very informative.

sevantaheri
Автор

Great instruction! Thanks. Haven't done the same exercise, but it makes sense for a newb like me.

whymerizza
Автор

Really helpful tutorial but maybe you should delete the chaos regarding the JDCB drivers and upload again.

arnemyggen
Автор

Its add external jar by the add jar and you should learn video editing and cut some unneeded parts. But the tutorial was helpful! Thanxs

timeeternity
Автор

Hello. Thanks for the videos. I get this error: "No operations allowed after connection closed MYSQL"

Individualist
Автор

thanks!  You can also add external Jar instead of creating the Folder :)


too bad there are some mistakes on the tutorial which makes the learning a bit confusing!

nordiskUSA
Автор


Just download the above and do what he does with all those libraries problem fixed...took me sometimes to find this. You are welcome!

geraldibra
Автор

In order to get the SQLite database file path, it's best to use the Path class to ensure you're using an absolute path instead of hard coding the path manually.

import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.LinkOption;

Path path = Paths.get("database.sqlite");
Path reaPath =

mmikhan
Автор

i also add all library. But i its show error.(Java, lang.ClassNotFoundException: org.sqlite.JDBC)....my database file path is correct but i have get ERROR ...anyone fix this ?

anisurrahman
Автор

pls help me, am getting java.sql.SQLEXCEPTION:No suitable driver found

daudbalogun
Автор

What if I have to refer to a database stored in my Package? I want to maintain my database in my source folder so that if I run the same application on my friend's PC it will work without changing the database path.

jaydave
Автор

hello sir I have eclipse juno . After added all jar file as your"s direction it shows erroe like "file does not exit" in your project but i had already added all the jar files it also shows in : company\jre system library folder.. can you resolve my problem

mayurgupta