Hello,

I have similar problems. i searched my PC for 'classes12.zip' but could not
find it. could anybody mail it to me. Also, i hope driver for MS-SQL is
included. Thank you.

Regards,

Najeem Lawal




                    Sajag Patel
                    <spatel@NUVENTIVE        To:     [EMAIL PROTECTED]
                    .COM>                    cc:
                    Sent by: A               Subject:     Re: java + oracle question ?
                    mailing list
                    about Java Server
                    Pages
                    specification and
                    reference
                    <JSP-INTEREST@JAV
                    A.SUN.COM>


                    21-01-03 08:53 PM
                    Please respond to
                    spatel






You need to place the classes12.zip in your lib directory.

sajag

-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]] On Behalf Of sufi malak
Sent: Tuesday, January 21, 2003 2:52 PM
To: [EMAIL PROTECTED]
Subject: java + oracle question ?


I have installed oracle 8i in windows2000, and have a java class to
connect to the oracle database, compiled it but when run it I got an
exception : oracle.jdbc.driver.OracleDriver Question : Do I need to
download a driver for oracle or it comes with the instatllation ??

Here is the code :

import java.sql.*;
public class JDBCExample {
  public static void main(String[] args) {
    try {
      Class.forName("oracle.jdbc.driver.OracleDriver");
      Connection conn = DriverManager.getConnection(
        "jdbc:oracle:thin:@majid:1521:test",
        "scott", "tiger");
      System.out.println("Got connected");
      int maxEmpNo = 7600;

      //Create PreparedStatement
      String s = "SELECT e.ename, e.job, d.dname "
        + "FROM emp e, dept d "
        + "WHERE e.deptno = d.deptno "
        + "AND e.empno < ?";
      PreparedStatement stmt = conn.prepareStatement(s);
      stmt.setInt(1, maxEmpNo);
      ResultSet rs = stmt.executeQuery();

      System.out.println("Name" + "\t" + "Job" + "\t" + "Department");
      while (rs.next()) {
        System.out.println(rs.getString("ename") + "\t"
          + rs.getString("job") + "\t"
          + rs.getString("dname"));
      }
    } catch (Exception e) {
      System.out.println(e.getMessage() );
    }
  }
}


Thanks






_________________________________________________________________
MSN 8: advanced junk mail protection and 2 months FREE*.
http://join.msn.com/?page=features/junkmail

========================================================================
===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set
JSP-INTEREST DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com

Reply via email to