CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2004

    sun.jdbc.odbc.JdbcOdbcDriver worked a minute ago

    After adding in a few lines of code I got this error:
    javax.servlet.ServletException: java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver

    I am using MySQL on Ubuntu 10.10.
    What am I missing?

    <!-- simple email login page -->
    <?xml version="1.0"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD Xhtml 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <!-- use sql query to store password  -->
    <%@ page import="java.sql.*" %>
    <body bgcolor="beige">
    <dd><font size="4">EMAIL</font></dd>
    <!-- form: when submitted information is sent to Logged-in page -->
    <form action="" method="get" name="EmailtoJSP">
    <!-- user enters data -->
    <td><input type="text" name="userName" width="20" size="20" maxlength="50"></td>
    <td><input type="password" name="password" width="20" size="20" maxlength="50"></td>
    <!-- user submits -->
    <td><input type="submit" value="Log In"></td>
    String UnameToDatabase=request.getParameter("userName");
    String PwordToDatabase=request.getParameter("password");
    Connection con = DriverManager.getConnection("jdbc:odbc:DSN"); // connects to database named 'Authenticate'
    Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
    String sqlstatement = "INSERT INTO passwords (username, password) VALUES (UnameToDatabase, PwordToDatabase)";
    <br>Need To <a href="">Register?</a><br>
    <br><a href="">Trouble</a> Logging In?<br>
    Last edited by edwardtisdale; March 2nd, 2011 at 01:01 PM. Reason: Take out peronalization

  2. #2
    Join Date
    Jul 2005
    Currently in Mexico City

    Re: sun.jdbc.odbc.JdbcOdbcDriver worked a minute ago

    Your application can't find driver JAR. Make sure it goes inside the WAR or that your application server has it in its shared libs.
    Wanna install linux on a vacuum cleaner. Could anyone tell me which distro sucks better?

    I had a nightmare last night. I was dreaming that Iím 64-bit and my blanket is 32-bit and I couldnít cover myself with it, so Iíve spent the whole night freezing. And in the morning I find that my blanket just had fallen off the bed. =S (from: bash.org.ru)

    //always looking for job opportunities in AU/NZ/US/CA/Europe :P

    USE [code] TAGS! Read this FAQ if you are new here. If this post was helpful, please rate it!

Tags for this Thread

Posting Permissions

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

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.