#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    2
    Rep Power
    0

    making it work on my RAQ4


    I am tearing my hair out here....... I am trying to get my RAQ 4 enabled to allow jsp and it keeps coming back with an internal error

    Unable to load class sun.jdbc.odbc.JdbcOdbcDriver

    Can anyone start to help me... my head hurts and I can't think what to do...

  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2003
    Location
    No es importante
    Posts
    2,065
    Rep Power
    14
    Can you post the code you are using to register and load the database driver?
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    2
    Rep Power
    0
    <html>
    <head>

    <title>
    giles
    </title>
    </head>
    <jsp:useBean id="database" class="grecipes.DatabaseConnection" scope="session"/>
    <html>
    <head>

    <title>
    giles
    </title>
    </head>
    <body>
    <h1>
    JBuilder Generated JSP
    </h1>
    <%@ page import="javax.servlet.*,java.sql.*,java.util.*" %>
    <%

    Connection con ;
    Statement stmt;
    ResultSet rs;

    String dishes = null;
    String course = "Soups";

    try {

    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

    //open a connection to the database


    con = DriverManager.getConnection("jdbc:odbc:DRIVER={Microsoft Access Driver (*.mdb)};DBQ=/home/sites/site27/web/Recipes.mdb");



    //execute the query
    stmt = con.createStatement();
    stmt.executeQuery("select * from tblRecipes");


    while(stmt.getResultSet().next() )
    {
    dishes = stmt.getResultSet().getString("course");

    %>
    The dish is: <%= dishes %> <br>

    <%
    }



    }
    catch(SQLException e){ e.printStackTrace(); }




    %>



    </body>
    </html>
    Last edited by christo; July 21st, 2003 at 07:08 AM.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2003
    Location
    No es importante
    Posts
    2,065
    Rep Power
    14
    Try starting a new instance.
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();

IMN logo majestic logo threadwatch logo seochat tools logo