Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: JDBC and class.ForName

Re: JDBC and class.ForName

From: Sami Seerangan <dba.orcl_at_gmail.com>
Date: Wed, 16 Feb 2005 10:17:47 -0500
Message-ID: <f09dd6280502160717401114fe@mail.gmail.com>


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_at_comcast.net <ryan_gaffuri_at_comcast.net> 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?
>
> --
> http://www.freelists.org/webpage/oracle-l
>

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Feb 16 2005 - 10:20:41 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US