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 database connection pooling? Advantages of using a connection pool?

1002


How to check jdbc connection in java?

876


How can I know when I reach the last record in a table, since JDBC doesn't provide an EOF method?

937


What is the use of callablestatement? Name the method, which is used to prepare a callablestatement.

834


What is layer in communication?

810


How to move the cursor in scrollable resultset ?

983


What is connection data?

853


What is jdbc architecture?

967


What is the purpose of jdbc resultset interface?

942


What is the advantage of namedparameterjdbctemplate?

911


What is jdbc url for mysql?

983


What are dml and ddl?

931


How does a custom RowSetReader get called from a CachedRowSet?

1023


Explain the difference between resultset and rowset in jdbc

953


Why is jdbc used?

882