I just downloaded the JDBC driver
SQLite-jdbc4-3.8.2-SNAPSHOT.jar
from
https://bitbucket.org/xerial/sqlite-jdbc/downloads
After that I included it in the eclipse project via
Customize build path
And after that I ran this code:
public class SQLiteINPUT
{
public static void main(String[] args) throws Exception
{
newDB();
}
public static void newDB () throws ClassNotFoundException, SQLException{
try{
Class.forName("org.sqlite.JDBC");
Connection con = DriverManager.getConnection("jdbc:sqlite:newDB.db");
con.close();
}catch(Exception ed) {
System.out.println("Error --> " + ed);
}
}}
Which successfully creates a new database file with the name
newDB.db
But if I open this file using Firefox SQLite Manager and run this code:
SELECT sqlite_version() AS 'SQLite Version';
It returns:
SQLite Version - 3.7.17
And not 3.8.2 , as the JDBC driver says. What am I doing wrong?!
source
share