| ★ wanayoo — archive 1999 http://wdvl.internet.com/Authoring/Java/Servlets/appendix2.html | Nouvelle recherche | Portail wanayoo |
|
|||
AppendixJune 12, 2000
Installing the Drivers Following is generic information on the driver set-up. One should consult the driver manual or accompanying documentation for specific instructions related to OS or other components. 1. Sun JDBC ODBC Bridge:As we discussed, if you have already installed the latest JDK version from SUN , you probably have the JDBC - ODBC bridge related classes. All you need now is:
Check out this FAQ if you are not sure about CLASSPATH. To install ODBC driver on Windows:
2. Oracle JDBC driverIf you have (or downloaded) oracle JDBC driver for your version of Oracle RDBMS:
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Use :
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
DriverManager.getConnection ("jdbc:oracle:thin:dbUser/dbPassword@hostName:1521:ORCL");
where:
Some versions of drivers may need the following type of call to getConnection:
Connection conn = DriverManager.getConnection ("jdbc:oracle:thin:@" + tnsName,dbUser,dbPassword);
where tnsName is the TNS name entry in tnsnames.ora (net easy config -
database name).
Building Web Applications Using Servlets and JSP Part II | |||
internet.com
| |
e-commerce
|
Copyright 1999-2000 internet.com Corp. Legal Notices. Privacy Policy.