Lost on JDBC driver and classpath


Results 1 to 3 of 3

Thread: Lost on JDBC driver and classpath

  1. #1
    Join Date
    Sep 1999
    Location
    Santa Cruz, CA, USA
    Posts
    1,212

    Lost on JDBC driver and classpath

    Okay... so I am attempting to take an application called Datavision out for a test drive as a possible replacement for Crystal Reports (which even under Windows can't seem to connect to an SQLite database). And I am being prompted for the following items:

    Driver Class Name:
    Connection Info:
    Database Name:
    User Name:
    Password:

    Of those items I have or know for certain the following:

    Database Name: <-- I know the db name since I created it.
    User Name: <-- there is no user name
    Password: <-- there is no password

    In the ever helpful INSTALL file I find this gem:

    Edit the file datavision.sh (Unix) or datavision.bat (Windows). For each
    JDBC driver you wish to use, add the path to that JDBC driver to the
    CLASSPATH.

    Fine and dandy for people that understand or know where this stuff is let alone how it works. I am pretty much lost and confused now. Any ideas?
    One by one the penguins steal my sanity...

    Vanpooling now...

  2. #2
    Join Date
    Jun 2003
    Posts
    173
    I don't know what specific driver you are using to connect but I can give you a couple examples that may help you figure out what you need.

    I use the Oracle Thin JDBC driver. It comes packaged in:
    ojdbc14.jar - CLASS_PATH would need to point to the directory containing this.

    Inside the ojdbc14.jar package there is a specific class for the oracle driver and that in this case is:
    oracle.jdbc.driver.OracleDriver - This is Driver Class name.

    Then you need a connection url in order to connect to the database using the appropriate jdbc driver which would date the form of:
    jdbc:mysql://<hostname>[<:3306>]/<dbname> - MySQL example
    jdbcracle:thin:@<server>[<:1521>]/<dbname> - Oracle driver example

    You will need to figure out exactly which jdbc driver you are using. Then you will need a specific connection url and Driver class name / path in the package.

    Hope this helps you find your solution.

  3. #3
    Join Date
    Jun 2003
    Posts
    173
    Okay after looking at SQLLite it looks like this is what you need:
    Driver Class Name: org.sqlite.JDBC
    Connection Info: jdbc:sqlite:<database_file>

    Also make sure that the path to the package:
    sqlitejdbc-v056.jar is included in the CLASS_PATH
    Last edited by lagdawg; 04-28-2010 at 04:57 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •