> Class.forName("sun.jdbc.odbc.JdbcOdbcDrive");
may be you have fallen prey to a typo error by missing out on the alphabet
'r':-).
The above should be changed to :
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Have a nice day.
With regards,
Sachin S. Khanna
http://www.emailanorder.com
----- Original Message -----
From: Sharon Om <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, May 12, 2001 1:53 AM
Subject: JDBC connection


> Hello.  I have the following code for connecting to the jdbc:odbc pool.
> While compiling the Java code, I keep getting an "ClassNotFoundException"
in
> Class.forName.
> I also tried declaring Class T and have T.forName.  I get the similar
error
> for "T.forName". How can I get this to work?
>
> Thank you for your help.
> Sharon
> ====================
> package property;
>
>
> import java.sql.*;
> import java.io.Serializable;
>
> public class database implements java.io.Serializable
> {
>
>   public database() {
>
>   }
>
> public String runSql()
> {
>  String browserOutput = "";
>  Connection sqlca = null;
>  Statement sqlStatement = null;
>  ResultSet myResultSet=null;
>
>
>  /*Connect to database, run SQL and produce output */
>
>  try {
>         /* Connection to the database */
>         Class.forName("sun.jdbc.odbc.JdbcOdbcDrive");
>         String theDatabase = "jdbc:odbc:loadtool";
>         sqlca =
DriverManager.getConnection(theDatabase,"loadtool","loadtool");
>   }
>  catch (SQLException e) {
>
>         browserOutput = "Error:SQL error of: "+e.getMessage();
>   }
>
>  return browserOutput;
> }
>
> }
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to