How to access SQLite 2.X Database from JDBC ( under Windows)?

Problem

JDBC driver available from http://www.zentus.com/sqlitejdbc/ is not compatible with SQLite 2.x databases.

Solution

1. Download driver from http://www.ch-werner.de/javasqlite/
2. Extract the zip file & copy sqlite_jni.dll into c:\windows\system32
3. Add sqlite.jar to you classpath
4. Following is how your java code should look like :

String driverClass = "SQLite.JDBCDriver";
String connectionString = "jdbc:sqlite:/C:/tools/SQLite/cdr.db";
Class.forName(driverClass);
conn = DriverManager.getConnection(connectionString);

Take a note of  "/" infront of "C:"

library project main code
Learn Cloud
Learn
Cloud

The WSO2 Application Server is a reliable application server that can host your enterprise web applications. The WSO2 Application Server as a Service is offered in StratosLive, the WSO2 Platform as a Service. This article explains how a simple web application can be developed and deployed from Carbon Studio to the WSO2 Application Server...

Latest Webinar
Different groups within an organization need to monitor different Key Performance Indicators (KPIs) - An operations team will be interested in the response times of business services and loads of each service,..
Thursday, February 9th 2012, 09.00 AM (PST)

Thursday, February 9th 2012, 10.00 AM (GMT)