Well, without knowing what exception it is, it's just a guess.  But, I'd bet
you are using a User DSN in your ODBC Configuration, when you need to be
using a System DSN.
    (*Chris*)

----- Original Message -----
From: Stefan Labuhn <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 26, 1999 9:44 AM
Subject: Servlet and JDBC problems


> Hi
>
> I want to make a connection to a FoxPro database.
> When I do this connection with an application I have no problems.
> But when I do it in the servlet I get an Exception.
> I use the IIS and FoxPro Database.
>
> Here is the exception:
>
> java.sql.SQLException: No suitable driver
> java.lang.Throwable.<init>(Compiled Code)
> java.lang.Exception.<init>(Compiled Code)
> java.sql.SQLException.<init>(SQLException.java:64)
> java.sql.DriverManager.getConnection(Compiled Code)
> java.sql.DriverManager.getConnection(DriverManager.java:126)
>
>
> and here is the code:
>   try
>       {
>         Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
>         Connection connection =
> DriverManager.getConnection("jdbc:odbc:FoxPro", "Name", "Passwort");
>         Statement statement = connection.createStatement();
>         dbout(statement);
>
>         statement.close();
>         connection.close();
>       } catch(java.lang.ClassNotFoundException e)
>       {
>       e.printStackTrace();
>       } catch(java.sql.SQLException e)
>       {
>       e.printStackTrace();
>     }
>
>
> Can someone help me?
>
> Thanks
>     Stefan
>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to