Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQlite in NetBeans

hi I am trying to add sqlite driver into my netbeans 6.9.1 project, these are the steps that I have done :

  1. adding the the sqlitejdbc-v056.jar into the the libraries of my project
  2. in "services" tab in netbeans, creating a driver with a name of "SQLite" ,adding the driverfile and finding the driver class (org.sqlite.JDBC) for the Driver.
  3. now by right clicking on the driver and selecting "Connect Using", I have to add a JDBC URL connection for this driver, but any kind of URL that I add I keep getting this message :

Unable to add connection. cannot establish a connection to jdbc:sqlite:/ using org.sqlite.JDBC -unable to find a suitable driver-.

please let me know how to create this connection for a simple database. thanks

like image 341
user261002 Avatar asked Nov 24 '10 10:11

user261002


People also ask

Can SQLite be used with Java?

To use SQLite with java programs, you must have SQLite JDBC Driver and Java set up on the system. Follow the steps given below: Download latest version of sqlite-jdbc-(VERSION). jar from sqlite-jdbc repository.

Is there a GUI for SQLite?

The SQLiteStudio tool is a free GUI tool for managing SQLite databases. It is free, portable, intuitive, and cross-platform. SQLite tool also provides some of the most important features to work with SQLite databases such as importing, exporting data in various formats including CSV, XML, and JSON.


1 Answers

If you are working on windows, change all backslashes to slashes in your path. This one I'm using right now:

jdbc:sqlite://T:/data/sampledb.sqlite
like image 98
dev-null-dweller Avatar answered Oct 28 '22 07:10

dev-null-dweller