HI,

   We have a time tracking system in place which is a SQLite database.
Now I am trying to get the data out of it and display it on a JSP
page.

As a starting point I am trying to get a connection to SQLite and
haven't been successfull with it. Below is the URLs I tried to connect
to SQLite but no luck

<%@ page language="java" import="java.sql.*" %>
<%

        String driver = "org.sqlite.JDBC";
        Class.forName(driver);
        //Class.forName(driver).newInstance();

        Connection con=null;
        ResultSet rst=null;
        Statement stmt=null;

        try{
            //String url="jdbc:sqlite://ipaddress/spiceworks/db/
spiceworks_prod.db;//When tried this it is throwing 'out of memory'
error
            //String url="jdbc:sqlite://ipaddress/spiceworks/db/
spiceworks_prod.db;integratedSecurity=true";//When I tried this it is
throwing opening db: '//ipaddress/spiceworks/db/
spiceworks_prod.db;integratedSecurity=true': Access is denied
            //String url="jdbc:sqlite://ipaddress/spiceworks/db/
spiceworks_prod.db?user=userid;password=pwd";
            //When I tried the above it is throwing ...
            // opening db: '//ipaddress/spiceworks/db/
spiceworks_prod.db?user=;password=': The filename, directory name, or
volume label syntax is incorrect
            String url="jdbc:sqlite://ipaddress/spiceworks/
spiceworks_prod.db";
            //opening db: '//ipaddress/spiceworks/spiceworks_prod.db':
Access is denied
            //String url="jdbc:sqlite://ipaddress/spiceworks/db/
spiceworks_prod.db";//out of memory. Is 'Out of memory' means no
datbase found??


                con=DriverManager.getConnection(url);
            //con=DriverManager.getConnection("jdbc:sqlite:/ipaddress/
spiceworks/db/spiceworks_prod.db","",""); //The same out of memory
exception
                //stmt=con.createStatement();
                //System.out.println(stmt);
                System.out.println("There are no errors in connecting
the SQLite database");
        }
        catch(Exception e){
                System.out.println(e.getMessage());
        }

What the errors mean:
1)Is 'out of memory' means database no found?
2).What does 'opening db: '//ipaddress/spiceworks/spiceworks_prod.db':
Access is denied' mean
3).How do I use windows authentication to connect to SQLite? I just
used SQL Server's integratedSecurity=true option just for a kick
opening db: '//ipaddress/spiceworks/db/
spiceworks_prod.db;integratedSecurity=true': Access is denied. Is
there an option available in SQLite to use some thing like this?
4).what does the opening db '....': The filename, directory name, or
volume label syntax is incorrect' in the exception
'opening db: '//ipaddress/spiceworks/db/spiceworks_prod.db?
user=;password=': The filename, directory name, or volume label syntax
is incorrect'
mean?

Any help is greately appreciated. The final objective is to be able to
connect to SQLite using windows authentication (some thing like
integratedSecurity=ture that we use in sQL server).

If I have any I will post my findings here.

Thanks in advance,

L

-- 
Mailing List: http://groups.google.com/group/sqlitejdbc?hl=en
To unsubscribe, send email to [email protected]

Reply via email to