Re: JDBC and class.ForName

  • From: Sami Seerangan <dba.orcl@xxxxxxxxx>
  • To: ryan_gaffuri@xxxxxxxxxxx
  • Date: Wed, 16 Feb 2005 10:17:47 -0500

class.ForName is to register the JDBC Driver.

Either you can use class.ForName("Driver")  

OR
you can use registerDriver method from DriverManager class as below..
DriverManager.registerDriver(new oracle.jdbc.OracleDriver());

HTH
Sami


On Wed, 16 Feb 2005 14:46:03 +0000, ryan_gaffuri@xxxxxxxxxxx
<ryan_gaffuri@xxxxxxxxxxx> wrote:
> been flipping through several docs, etc... on the jdbc. most of the say i 
> need to execute
> class.ForName("driver") to use the jdbc. The example for the database that 
> comes with the J2EE sun download(pointbase) uses it.
> 
> however, when i look in
> 
> $ORACLE_HOME/jdbc/demo/JDBCCheckup.java
> 
> I believe the oracle jdbc docs said to play with this script to learn the 
> jdbc.
> 
> it does not use class.ForName. Worked fine for me. anyone know when you have 
> to use this? Docs aren't clear? do i only need it for the thick driver?
> 
> --
> //www.freelists.org/webpage/oracle-l
>
--
//www.freelists.org/webpage/oracle-l

Other related posts: