Questions tagged [sqlitejdbc]

SQLite JDBC is the JDBC interface of SQLite database. It supports both single thread and thread-safe operation modes. Questions tagged by this tag should also be tagged Sqlite.

SQLite JDBC is the JDBC interface of SQLite database.

There are multiple JDBC drivers for this database:

  • Xerial that uses the packaged native libraries for different platforms. The authors claim that using native code makes the driver faster.
  • the Zentus that is pure Java-only implementation. The initial project page is here but seems not available at the time of writing. The backed up content can be found here in GitHub.

Both can be easily added to project by just adding them to classpath.

The thread safety of the SQLite JDBC connection depends on the SQLite operation mode and can be single thread, multiple thread but only one per connection and serialized (no restrictions). The operation mode should be selected at compile time. With certain limitations, it can be further changed at start time, some changes are also possible at run time.

62 questions
0
votes
1 answer

Load a SQLite3 database from a .sql file using java sqlite-jdbc

I'm trying to put together a simple project that uses a SQLite3 database and I'm planning to use the sqlite-jdbc driver for it. I would prefer to create the database from a .sql file, rather than explicit commands in Java though. I could just…
Kaliklipper
  • 355
  • 5
  • 19
0
votes
1 answer

detach sqlite database in java

I want to detach the current sqlite database(OLD) before i attach the NEW sqlite database. But when I execute below code: Statement statement = connection.createStatement(); statement.execute("DETACH database '" + alias+"'"); statement.close();** I…
Anantha
  • 31
  • 6
0
votes
2 answers

Getting version of Sqlite database

I am using the sqliteJDBC library (SqliteDriver) in my Java desktop application to hook to my sqlite database. Is there a way I can get the version of the database? This way I can know if I need to add missing tables based on the current database…
Snake
  • 14,228
  • 27
  • 117
  • 250
0
votes
1 answer

avg() with sqlite-jdbc

I have a query which relies on avg() using sqlite-jdbc to connect to a sqlite database. However when my query runs I get an answer of 0.0 for the average, but when I run the same query elsewhere (portable database viewer) I get the expected…
Alastair
  • 338
  • 2
  • 11
0
votes
2 answers

Are there big differences from SQLite to SQLiteJDBC?

Will I get support successful from SQLite users even using SQLiteJDBC? (I know nothing about both)
The Student
  • 27,520
  • 68
  • 161
  • 264
0
votes
2 answers

Java SQLite org.sqlite.JDBC classpath broken?

I stumbled upon a weird error while using JDBC sqlite with org.sqlite.JDBC my code compiles and runs fine on Windows. But when I tried moving it to Ubuntu it started showing this: Exception in thread "main" java.lang.ClassNotFoundException:…
Maciej Jankowski
  • 2,794
  • 3
  • 26
  • 33
0
votes
1 answer

Iterate for each row in SQLITE JDBC Table to update only specific cell values in that row

I have to iterate over each row in SQLITE JDBC on-memory table in order to update the cell value of one of the columns using the cell value of another column in the same row. E.g. For each row in the table, take cell value of column 3, make some…
Indigo
  • 2,887
  • 11
  • 52
  • 83
0
votes
0 answers

Sqlitejdbc native dll mismatch.?

I have used Sqlitejdbc-v056.jar and respected native sqlitejdbc.dll. but the problem now is Just i have updated the old sqlitejdbc-v056.jar file with sqlitejdbc-3.7.2.jar and am using old native dll. will it create a problem.? Thanks in advance.!!
sanjay
  • 45
  • 1
  • 8
0
votes
1 answer

eventhough i change the environmental variables and classpath, while running sqlite jdbc program i get the error stating no class definition doun

im running a jdbc program on Sqlite. though i change the environmental variables or define the classpath of the jar file sqlite-jdbc-3.7.2.jar, i get an error stating ClassNotFoundException: org.sqlite.JDBC... how to rectify it? my code is` import…
0
votes
1 answer

Inserting email in SQLite database using JDBC

I am trying to insert an email ID to a table in my SQLite3 Database. In my case it successfully creates the table but gives an error while inserting a record in it - "near "@gmail": syntax error". How can i resolve this ? Here is the code - public…
Dan
  • 801
  • 2
  • 14
  • 29
0
votes
1 answer

using a Java DB Connection in another form

I have created a simple Java connection script in Java to connect to a database shown below. import java.sql.*; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import java.sql.Statement; public class dbconn…
Silentdarkness
  • 461
  • 1
  • 10
  • 30
0
votes
1 answer

Special character in path to open SQLite database connection

I am trying to get a connection to a SQLite database (using Eclipse on Windows 8). Everything workes fine as long as the path name doesn't contain any special characters (like "é"). I tried to convert it to UTF-8 (because I read on…
casaout
  • 1,819
  • 3
  • 24
  • 54
0
votes
1 answer

Failed to connect to sqlite engine driver from Liquibase

I downloaded/installed liquibase-1.9.3 and sqlite-jdbc-3.7.2.jar into ubuntu 11.*. and put sqlite-jdbc-3.7.2.jar in liquibase-1.9.3 /lib. and I run: java -jar liquibase-1.9.3.jar --driver=org.sqlite.JDBC --changeLogFile=assets_db.xml…
user1342336
  • 967
  • 2
  • 16
  • 28
0
votes
1 answer

is sqlitejdbc driver included in sqlite or default java installation on linux system

I installed liquibase in my ubuntu to work with sqlite, which requires sqlitejdbc driver to run. I can not find if this driver was already installed when I was installing sqlite 6 months ago. Thanks a lot.
user1342336
  • 967
  • 2
  • 16
  • 28
-1
votes
1 answer

How can I delete row from parent table has a referenced column to child table?

I'm using JDBC in javaFx project with SQlite database. I have two tables "PROJECT" and "SMAllPROJECT" such as PROJECT has this structure PROJECT(name,date,state) and SMAllPROJECT has this structure SMAllPROJECT(name,date,state,*project_name*).…