How do I make a database service in Netbeans 6.5 to connect to SQLite databases?

I am using Netbeans IDE (6.5) and I have a SQLite 2.x database. I have installed the Jite SQLite driver from and added the new driver in the Nebeans services panel. Then tried to connect to my database file from Services> Databases using this url for my database:

JDBC: SQLite: /home/farzad/netbeans/myproject/mydb.sqlite

but it cannot connect. I am getting this exception:

org.netbeans.modules.db.dataview.meta.DBException: Unable to Connect to database : DatabaseConnection[name='jdbc:sqlite://home/farzad/netbeans/myproject/mydb.sqlite [ on session]']
    at org.netbeans.modules.db.dataview.output.SQLExecutionHelper.initialDataLoad(
    at org.netbeans.modules.db.dataview.output.DataView.create(
    at org.netbeans.modules.db.dataview.api.DataView.create(
    at org.netbeans.modules.db.sql.execute.SQLExecuteHelper.execute(
    at org.netbeans.modules.db.sql.loader.SQLEditorSupport$
    at org.openide.util.RequestProcessor$
[catch] at org.openide.util.RequestProcessor$


What should I do?: (


source to share

2 answers

The current version of Zentus SQLiteJDBC is v053, based on SQLite 3.6.1. It will not open SQLite 2.x database. Perhaps you can use the SQLite 2.x command line tool to .dump your database and the Sqlite3 command line tool to download it. Using Zentus SQLiteJDBC to Access New SQLite 3.x Database.

Alternatively, use a JDBC driver that supports SQLite 2, like this one .



I like...

I made two mistakes on my first try. After setting CLASSPATH

as a system variable (hope I didn't break smth else :)), putting sqlite_jni.dll

in a folder system32

and fixing JDBC url

, I was successful :)

I downloaded them as well SQLite ODBC wrapper

. Installed it and connected to my database SQLite2

via regular and UTF8

driver based ODBC

. I also used the built-in NetBeans JDBC-ODBC

Bridge driver to establish this connection.

All three connections are created, but:

  • ordinary ODBC driver

    : I see text data in the wrong encoding. All other columns are displayed correctly.

  • UTF8 ODBC driver

    : I can't see text data at all. All other columns are displayed correctly.

  • JDBC driver

    : I can't see the speaker at all. "Select * from my_any_table"

    always returns an empty single column

I have Russian data in my database.

So ... I am currently back to the sqlite command line interface :))



All Articles