Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what exactly happens when we execute
"Class.forname("Driver class name");"?Explain indetail

Answer Posted / srinivas.r, -parigi

Class is predefined class and .forName() is the static
method , it is responsiblity of jdbc Driver implementer to
provide a static block as part of the driver class.As part
of this sttic block code will be provided to take care of
registering the driver
EX : --------------****--------
public class Drv implements Driver
{
static{Driver d=new OracleDriver();
DriverManager.register(driver);
}}
----------------*******--------
As the sttic block provided by the driver vender can take
care of registering the driver instance of following code
----------
Driver drv=new Oralce.jdbc.driver.OracleDriver();
DriverManager.registerDriver(driver);
----------
by providing directly
Class.forName("oralce.jdbc.driver.OracleDriver");
the above code will be executed.........All the best.
------- Thank u to providing this facility

Is This Answer Correct ?    12 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Name the types of jdbc drivers.

861


What is a java driver?

931


How do you determine the sensitivity of the ResultSet object?

921


Can I use JDBC to execute non-standard features that my DBMS provides?

930


What is jdbc odbc connection?

922


How to check jdbc driver version in websphere?

1014


Is it possible to connect to multiple databases simultaneously?

994


How does a custom RowSetReader get called from a CachedRowSet?

1024


What causes the "No suitable driver" error?

968


What is savepoint in jdbc?

866


What are the advantages of using jdbc datasource?

926


What do you mean by jdbc batch processing and what are the advantages of using jdbc batch processing?

939


code to insert values/rows into oracle database from a java swing textfield when a button is pressed(using preparedstatements)

4366


Explain about the Try Block?

914


Give a way to check that all result sets have bin accessed and update counts are generated by execute method.

881