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 is the difference between ojdbc6 and ojdbc7?

885


What does executeupdate return in jdbc?

985


What are jdbc and its components?

987


Does jpa use jdbc?

927


Explain about the drive manager class working?

1117


What is jdbc servlet?

969


How do I insert/update records with some of the columns having NULL value?

943


What are restrictions on triggers?

2232


Briefly tell about the jdbc architecture.

999


How do I find jdbc version?

1008


What is ODBC and JDBC? How do you connect the Database?

1042


Does sql allow null values ? Can we use it within where clause ?

982


How do I insert an image file (or other raw data) into a database?

969


What is ojdbc?

947


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

1014