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...

How do you know which driver is connected to a database?

Answer Posted / nadia

// By the help of DatabaseMetadata it gives all the
information about the date base for which our progrim is
connected
// here it goes

1.Class.forName("DriverClass name");
2.Connection con =DriverManager.getConection("URL Of
Manager Class");
DatabaseMetadata dmeta= con.getMetadata();
// by calling the method getDriverName() name we can
able to know that which driver is coonected to the database.
3. System.out.println(" driver name " +
dmeta.getDriverName());

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different types of statements in jdbc?

904


Explain the role of driver in jdbc.

976


What is @entity in java?

936


What is odbc and jdbc drivers?

935


What are the basic exceptions in jdbc?

1081


What are types of jdbc drivers?

974


What is database connection pooling? Advantages of using a connection pool?

1041


What do you mean by database connection pooling?

934


What is jdbc driver in java?

910


Is jdbc open source?

840


Does jpa use jdbc?

906


What is the fastest type of JDBC driver?

1043


How can you use preparedstatement in jdbc?

969


Differentiate between a statement and a preparedstatement.

993


What are restrictions on triggers?

2204